The web server I usually use was apparently blown out by a storm, and will be down for an indefinite period of time.
I decided to move everything over to Hostgator, but it isn’t working.
I redirected my domain name on Namecheap to the new Hostgator IP address, and I uploaded all my files to the public_html folder. My files are all php, which my htaccess file permits.
I only set everything up about 40 minutes ago, so it’s possible that the issue is just time. However I’ve looked around and that hasn’t come up as an issue for anyone else.
I can’t think of anything else I may have done wrong. Any suggestions would be greatly appreciated.
Hostgator is a shared hosting provider. There are many, many websites served by that IP address. The way Hostgator knows what website to serve to the client is because, when you go to “http://mywebsite.com“, your browser sends the HTTP header
Host: mywebsite.com. Then Apache sees “mywebsite.com” and looks up your website’s content from your user account and delivers it to the web browser. If Hostgator does not receive theHostheader, then it has no idea what website to display, so it just gives you a 404.In short, you need to visit “yourwebsite.com” instead of the raw IP address.
If you find your computer is sending you to the old IP address, remember that it can take 4-12 hours for the DNS to populate around the world (nothing you can do about that), but usually if you refresh your local DNS cache, then the next lookup will get the right IP address (this usually works if you are in the same country as your DNS host). This can be done in Windows on the command line via
ipconfig /flushdnsfollowed byipconfig /registerdns. If you are using linux, look at this.