Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
Apache

Redirect IP Requests to Your Domain: Test and Fix IP Canonicalization

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose one canonical HTTPS hostname, then make requests that arrive through the server IP or alternate hostnames redirect to it. Verify the status, Location header, final URL, path and query string—not just whether the page appears in a browser. Align your redirects with canonical tags, internal links and sitemap URLs so visitors and search engines receive the same signal.

What an IP canonical issue is—and what a redirect fixes

An IP canonical issue occurs when the same site is reachable at a numeric IP address as well as its intended hostname, or through multiple combinations of hostname and scheme. For example, a page might load at an IP URL, at both the apex hostname and www, or over both HTTP and HTTPS. Search engines can treat these as alternate URLs for the same content.

The practical fix is to choose one canonical HTTPS hostname and redirect alternate entry points to it. A redirect tells browsers and crawlers where the preferred URL is; it does not replace the need to use consistent URLs in your site’s own links and search signals. Google describes redirects as a strong canonicalization signal and recommends checking the URL Google selected with URL Inspection.

DNS and redirects do different jobs. DNS resolves a hostname to an address; it does not, by itself, redirect someone who enters an IP address. The redirect must be handled by a layer that receives the HTTP request, such as the origin web server or a CDN rule.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
  • Dual band router upgrades to 1200 Mbps high speed internet (300mbps for 2.4GHz plus 900Mbps for 5GHz), reducing buffering and ideal for 4K stream
  • Full Gigabit Ports - Gigabit Router with 4 Gigabit LAN ports, ideal for any internet plan and allow you to directly connect your wired devices
  • Boosted Coverage - Four external antennas equipped with Beamforming technology extend and concentrate the Wi-Fi signals
  • MU-MIMO technology - (5GHz band) allows high speeds for multiple devices simultaneously
  • Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home

Choose the canonical destination before changing configuration

Decide on one exact hostname, such as https://example.com or https://www.example.com. Use that same hostname consistently in redirects, internal links, canonical tags and sitemap entries. If you choose the apex hostname, the www version should redirect to it; if you choose www, the apex should redirect to that instead.

Check that the certificate is valid for the destination hostname. An HTTPS request starts with a TLS connection, before the server can send an HTTP redirect. If the requested HTTPS IP or alternate hostname cannot complete TLS because its certificate is invalid, a browser may show a certificate warning before it can receive a redirect. Do not send visitors to a destination whose certificate does not match its hostname.

Decide what should happen to paths and query strings. For most sites, a request such as http://IP/articles/example?ref=test should arrive at the equivalent path and query on the canonical hostname. If you intentionally map all alternate requests to a fixed landing page instead, make that choice explicit and test it; otherwise, pages can be lost behind a redirect that always goes to the homepage.

Inventory the URLs that need to redirect

Before editing rules, list the entry points that apply to your site. Test the IP, hostname, scheme and representative URL paths rather than assuming one successful homepage check covers every case.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
TP-Link ER605, Wired Gigabit VPN Router
  • 【Five Gigabit Ports】1 Gigabit WAN Port plus 2 Gigabit WAN/LAN Ports plus 2 Gigabit LAN Port. Up to 3 WAN ports optimize bandwidth usage through one device.
  • 【One USB WAN Port】Mobile broadband via 4G/3G modem is supported for WAN backup by connecting to the USB port. For complete list of compatible 4G/3G modems, please visit TP-Link website.
  • 【Abundant Security Features】Advanced firewall policies, DoS defense, IP/MAC/URL filtering, speed test and more security functions protect your network and data.
  • 【Highly Secure VPN】Supports up to 20× LAN-to-LAN IPsec, 16× OpenVPN, 16× L2TP, and 16× PPTP VPN connections.
  • Security - SPI Firewall, VPN Pass through, FTP/H.323/PPTP/SIP/IPsec ALG, DoS Defence, Ping of Death and Local Management. Standards and Protocols IEEE 802.3, 802.3u, 802.3ab, IEEE 802.3x, IEEE 802.1q
  • http://IP/ and, where TLS permits, https://IP/.
  • The apex hostname and www, each over HTTP and HTTPS.
  • A representative nested path and a URL with a query string.
  • IPv6 access if your server or CDN exposes IPv6.
  • Unknown or default-host requests that reach the server with an unexpected Host value.

For each test, record the HTTP status, the Location response header and the final URL after redirects. This reveals whether a request reaches the intended rule, whether it takes multiple hops, and whether the path or query was changed.

Where to implement the redirect

At the origin web server

Use a dedicated default or catch-all virtual host on Apache or Nginx for requests addressed to the IP or an unrecognised hostname. It should return a server-side permanent redirect to the exact canonical HTTPS hostname while preserving the requested path when that is the intended mapping. This approach is useful when you control the origin and want the server to handle requests that reach it directly.

Make sure the rule is scoped to alternate hosts rather than the canonical host itself. A rule that also matches the destination can send visitors back through the redirect repeatedly. Apache documents external redirects that leave the canonical URL visible in the browser address bar; whatever server configuration you use, verify the actual response rather than relying on a rule that merely appears syntactically plausible.

At Cloudflare

If the hostname is proxied through Cloudflare, a Redirect Rule can match the request host and send it to the canonical HTTPS hostname. Configure path and query handling to preserve the original values when appropriate, then test a nested path with a query string. Cloudflare also documents forwarding for alias domains that do not have an origin server attached.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
  • Dual-band Wi-Fi with 5 GHz speeds up to 867 Mbps and 2.4 GHz speeds up to 300 Mbps, delivering 1200 Mbps of total bandwidth¹. Dual-band routers do not support 6 GHz. Performance varies by conditions, distance to devices, and obstacles such as walls.
  • Covers up to 1,000 sq. ft. with four external antennas for stable wireless connections and optimal coverage.
  • Supports IGMP Proxy/Snooping, Bridge and Tag VLAN to optimize IPTV streaming
  • Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home
  • Advanced Security with WPA3 - The latest Wi-Fi security protocol, WPA3, brings new capabilities to improve cybersecurity in personal networks

Choose the edge or origin based on where the request is received and which layer you control. If the IP is reachable directly at the origin, a CDN rule for proxied hostnames may not cover that path. Conversely, a rule at the origin cannot handle a request that is redirected before it reaches the origin. Account for both routes when they exist.

Use a permanent or temporary redirect deliberately

For a production canonical choice that should remain in place, use a permanent server-side redirect. For a temporary search experiment where you want the original URL to remain the preferred indexed URL, Google recommends a 302 rather than a 301. Choose the status for the intended duration and indexing signal, not simply because one is familiar.

After choosing a permanent redirect, treat the destination as the stable URL in your site configuration. Avoid chains such as HTTP to one hostname, then to HTTPS, then to the final hostname. Have alternate entry points reach the selected HTTPS hostname in one redirect where your setup allows it.

Test the redirect, headers, path and query

Use a command-line HTTP client to inspect the response headers and follow the redirect chain. Replace the example address and domain with your own values. The first command shows the initial response; the second follows redirects and reports the final effective URL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
  • DUAL-BAND WIFI 6 ROUTER: Wi-Fi 6(802.11ax) technology achieves faster speeds, greater capacity and reduced network congestion compared to the previous gen. All WiFi routers require a separate modem. Dual-Band WiFi routers do not support the 6 GHz band.
  • AX1800: Enjoy smoother and more stable streaming, gaming, downloading with 1.8 Gbps total bandwidth (up to 1200 Mbps on 5 GHz and up to 574 Mbps on 2.4 GHz). Performance varies by conditions, distance to devices, and obstacles such as walls.
  • CONNECT MORE DEVICES: Wi-Fi 6 technology communicates more data to more devices simultaneously using revolutionary OFDMA technology
  • EXTENSIVE COVERAGE: Achieve the strong, reliable WiFi coverage with Archer AX1800 as it focuses signal strength to your devices far away using Beamforming technology, 4 high-gain antennas and an advanced front-end module (FEM) chipset
  • OUR CYBERSECURITY COMMITMENT: TP-Link is a signatory of the U.S. Cybersecurity and Infrastructure Security Agency’s (CISA) Secure-by-Design pledge. This device is designed, built, and maintained, with advanced security as a core requirement.
curl -sS -D - -o /dev/null 'http://203.0.113.10/articles/example?ref=test'
curl -sS -L -D - -o /dev/null -w 'nFinal URL: %{url_effective}nFinal status: %{http_code}n' 'http://203.0.113.10/articles/example?ref=test'

The example IP is reserved for documentation, not a real server. Substitute your server’s public IP. In the first response, look for a permanent redirect status and a Location value on the chosen HTTPS hostname. In the followed result, confirm the final URL contains the expected path and query and returns a successful page status.

Repeat the check for the apex, www, HTTP and HTTPS variants, plus IPv6 if enabled. An HTTPS IP test can fail at TLS negotiation before an HTTP status or Location exists; that is different from an HTTP redirect failure. Use a browser only as a supplementary check, since cached redirects or browser behavior can make it harder to see the original response.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Align the rest of your canonical signals

A redirect is one part of canonicalization. Update internal links so they point directly to the canonical hostname, use self-referencing rel="canonical" tags on canonical pages, and list those same URLs in your sitemap. Google identifies redirects, HTTP/HTTPS handling, canonicals and sitemaps as canonicalization signals; conflicting signals make the preferred URL less clear.

After deployment, inspect representative canonical URLs in Search Console’s URL Inspection and check the redirect chain. Google’s selected canonical can take time to reflect recrawling, so distinguish an immediate HTTP test from the later indexing result. For URL changes, Google also recommends command-line testing alongside URL Inspection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
TP-Link Dual-Band AX3000 Wi-Fi 6 Wireless Gigabit Internet Router for Home
  • Next-Gen Gigabit Wi-Fi 6 Speeds: 2402 Mbps on 5 GHz and 574 Mbps on 2.4 GHz bands ensure smoother streaming and faster downloads; support VPN server and VPN client¹
  • A More Responsive Experience: Enjoy smooth gaming, video streaming, and live feeds simultaneously. OFDMA makes your Wi-Fi stronger by allowing multiple clients to share one band at the same time, cutting latency and jitter.²
  • Expanded Wi-Fi Coverage: 4 high-gain external antennas and Beamforming technology combine to extend strong, reliable, Wi-Fi throughout your home.
  • Improved Battery Life: Target Wake Time helps your devices to communicate efficiently while consuming less power.
  • Improved Cooling Design: No heat ups, no throttles. A larger heat sink and redefined case design cools the WiFi 6 system and enables your network to stay at top speeds in more versatile environments.

Verification checklist

  • The IP and every applicable alternate host or scheme returns a redirect to one exact HTTPS hostname.
  • The redirect reaches the canonical destination in one hop where possible.
  • The Location header does not point back to the IP, an old hostname or an HTTP URL.
  • Paths and query strings are preserved or intentionally mapped, and the final page is the one expected.
  • The final response is a normal successful page, not a loop, error or unrelated default virtual host.
  • The destination certificate matches the hostname, and CDN/origin TLS settings are consistent.
  • Canonical tags, internal links and sitemap entries all name the same hostname.
  • Search Console URL Inspection shows the expected Google-selected canonical after recrawl.

Troubleshooting common failures

The IP still shows the site instead of redirecting

The request may be reaching a default virtual host that serves the site, or bypassing a CDN rule that only covers proxied hostnames. Confirm the request’s destination layer and host handling, then add or correct the catch-all behavior at the layer that receives it. Test the bare IP and a hostname separately.

The browser reports a certificate error on HTTPS IP requests

TLS validation happens before the HTTP redirect. A certificate mismatch can prevent the browser from receiving the redirect at all. Test HTTP separately to confirm whether an HTTP redirect rule works, and ensure the canonical destination has a valid certificate for its hostname. Do not treat a pre-HTTP TLS failure as evidence that a redirect response was sent.

The redirect loops or takes several hops

A loop commonly means the rule also matches the canonical host, or that the CDN and origin disagree about scheme or destination. Inspect each response’s Location header with redirect following enabled. Narrow the match to alternate hosts and make the final scheme and hostname consistent across layers.

The path or query disappears

The rule may be sending every request to a fixed URL, or its forwarding settings may not preserve the original URL components. Test a real nested path and query parameter, then configure the rule to retain them if that is the intended behavior. Cloudflare’s documented forwarding behavior can preserve both path and query string.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The response is a page, an error or an unrelated site

The request may be hitting the wrong virtual host, an origin error route or a destination that does not serve the requested path. Compare the initial status and Location with the followed final URL. Correct the host match or mapping, and verify that the canonical destination serves the page rather than merely accepting the redirect.

Google still selects another URL

First distinguish the server result from the indexing result: confirm the redirect with a live command-line request, then use URL Inspection to check Google’s selected canonical after recrawl. Review whether canonical tags, sitemap entries or internal links still point to the alternate URL. A correct redirect does not make inconsistent site signals disappear instantly.

Or skip the browser setup

If you want a visual check of the canonical destination after you have verified the HTTP redirect, ScreenshotNeo can capture that page with one API request. A screenshot can help confirm what the destination renders; it does not replace checking the redirect status and headers.

Quick Recap

Bestseller No. 1
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
MU-MIMO technology - (5GHz band) allows high speeds for multiple devices simultaneously
$44.99
SaleBestseller No. 2
Bestseller No. 3
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
Supports IGMP Proxy/Snooping, Bridge and Tag VLAN to optimize IPTV streaming
$34.99
SaleBestseller No. 4
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
VPN SERVER: Archer AX21 Supports both Open VPN Server and PPTP VPN Server
$69.99
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/articles/example -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners, popups and chat widgets are removed before the shot; bot checks, blank pages and failed loads are never billed. An MCP server lets AI agents take screenshots. The Free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Learn about ScreenshotNeo, or sign up free for 1,000 screenshots a month with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.