My Hostgator IP is giving me 404 error

The web server that I usually use was apparently a bloated storm, and will run for an indefinite period of time.

I decided to move everything to Hostgator, but it does not work.

I redirected my domain name on Namecheap to the new Hostgator IP, and I uploaded all my files to the public_html folder. My files are all php that my htaccess file permits.

I just installed everything about 40 minutes ago, so it’s possible that the problem is just the time. However, I looked around, and this did not seem to anyone a problem.

I can’t think of anything else; I may have been mistaken. Any suggestions would be greatly appreciated.

+6
source share
2 answers

Hostgator is a hosting provider. This IP address is served by many websites. As Hostgator knows which website serves the client, because when you go to " http://mywebsite.com , your browser sends the HTTP header to Host: mywebsite.com . Then Apache sees" mywebsite.com "and looks at the contents your website from your user account and delivers it to a web browser.If Hostgator does not receive the Host header, then it has no idea which website should be displayed, so it just gives you 404.

In short, you need to visit "yourwebsite.com" instead of your raw IP address.

If you find that your computer is sending you to the old IP address, remember that it may take 4-12 hours to fill in the DNS around the world (you can do nothing about it), but usually if you update your local DNS, then the next search will get the correct IP address (this usually works if you are in the same country as your DNS host). This can be done on Windows at the command line via ipconfig /flushdns , and then ipconfig /registerdns . If you are using linux, have a look at this .

+9
source

Access to your web hosting area for a shared IP address can be obtained by adding your username to the ip address for example:

http: // {IP ADDRESS} / ~ {YOUR USERNAME}

Its work for most web hosts!

Update: Works well on the two most popular web hosts: Cpanel and DirectAdmin

+19
source

Source: https://habr.com/ru/post/921013/


All Articles