404 error handling

Searching the forum does not reveal any input on 404 error handling.

Does the community have any input on how to develop code to direct
to a specific error page?

Or is this still relevant to SEO?

Thanks in advance.

Rich

I’ve asked about this in the past, especially in relation to creating custom 404 pages, but not had any real response. In another design app I’m able to create custom 404 pages using the .shtml file extension and they just work.

I have one working with Blocs, any url typed that isn’t a url will re-direct to a 404 not found. Although I did have to modify my .htaccess file in the cPanel.

I cant quite remember off the top of my head…but I just checked and I believe you make a custom 404 page, put what text/buttons you like on it, have it set to no index and nofollow, add it into your root folder or where your website files are, then in .htaccess put this line in:

ErrorDocument 404 /404.html

1 Like

Yes, that´s the right way. I think you don´t need “noindex nofollow” because google ignores error pages.

Better to be safe anyway.

1 Like

Thanks for the input it is appreciated.

I am putting together a small site. When creating a 404 page do you put it in menu so it is visible in a drop down menu? Or does a method exist to make it invisible from the menu?

It shouldn’t be visible. Just make a new page and delete it from the nav bar, drop down links etc. You should not be able to access it other than typing a wrong link :slight_smile:

Some of the 404 error handling

  1. Make sure your contact information is clearly shown.
  2. Give links to your internal pages which are similar and popular for your site.
  3. If you have a blog then insert links to that post.
  4. Implement a 301 redirect if the 404 error page is having an important link from an external source.
  5. You can redirect to alternate URL or a new one but webpage must be suitable.
  6. Every time the home page is not only the one option, but you can also give links to different pages.
1 Like