: What could cause my site to redirect to its IP address using Apache2? I've been playing around with various web configurations in Debian for about a year now. I've set up DNS for a fow
I've been playing around with various web configurations in Debian for about a year now. I've set up DNS for a fow domains in the process and have never really had an issue. I:
Go to Google domains and point the DNS at my ip
Go to digital ocean and do the same thing
Set up Server Name and Server Alias in my sites-available config file
Then I'm off to the races.
However this time around after doing those things, my site will resolve if I use the domain name, but the URL changes to show the IP address once the page has loaded.
I don't even know how this could happen or what information someone would need to know what's causing it. What could be going wrong?
More posts by @YK1175434
1 Comments
Sorted by latest first Latest Oldest Best
... but the URL changes to show the IP address once the page has loaded.
This is only possible via post javascript processing of the page. Somewhere in the javascript code, there is a line instructing the web browser to replace the contents of the address bar with the IP address.
The only other possibility is that your web browser may contain a virus or it might have been created poorly.
If however you worded your question wrong and you're trying to say "the URL in the address bar changes to the IP address before the page has finished loading" then you have an HTTP response from accessing the URL itself that indicates a redirect to the IP address.
Go to redbot.org and put in followed by your domain name (no spaces) and press enter to see results.
If the first line of the response starts with any of the following:
HTTP/1.1 301
HTTP/1.1 302
HTTP/1.0 301
HTTP/1.0 302
Then its redirecting to another URL which is listed next to the line beginning with:
Location:
That URL is likely the IP address you're complaining about.
If you want to investigate more, you can visit webpagetest.org and put in your domain there and in the results, access the waterfall section (where you see how long each request takes) and if you see yellow bars, then that means at least one redirect to another URL happened.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.