How to Change 404 Error Page in HostGator?
I am sure you might have seen 404 error pages while browsing internet. Do you know that you can actually customize your 404 error page? It’s really very simple to change 404 error page. It takes just minutes to set up.
What is 404 Error Page?
When you browse a URL which doesn’t exist, you will get 404 error in your browser. It might happen that somebody has miss spelled the URL while linking and when you access that URL, you will get 404 Error. 404 Error simply means page not found.
404 Error Page in HostGator
If your site is hosted with hostgator, you will see 404 error page like this.
HostGator has setup 404 page to promote hostgator. You can see when you browse invalid URL, you are being redirected to hostgator promotion page. That’s actually good but you can customize your 404 page and you can actually put your site related content on it. That improves visitor’s experience.
To set up your 404 error page, first create one custom page which has error message and related links on it. You can name it any. I generally use notfound.html. Here is my 404 error page.
Once the 404 page created, upload it to your server. Now you need to change .htaccess file on your server. Remember that you are going to put .htaccess file on the root directory of your domain for which you want to setup 404 error page.
If .htaccess file is not there then create it. If it’s already there then append the new content. You just need to put following line in the .htaccess file.
ErrorDocument 404 /notfound.html
That’s it. Upload the .htaccess file and you are done. When anybody visits invalid URL, visitor will be redirected to notfound.html page on your server.
Back to Hostgator Tutorials
Go to Home