Understanding the 404

As hard as we try OR as O.C.D. as some of us are, when our websites grow to a hundred or more posts and as many pages, we're bound to have a broken link somewhere.

If we have some anchor text going to a non-existent page (because we deleted it or changed the permalink) it forces WordPress to present the dreaded 404 Page Not Found error.

UPDATE: How to discover if you have broken links that might yield a 404:

https://my.wealthyaffiliate.com/training/fix-googl...

Interlinking your pages (other than using the standard menu navigation) is good for SEO. And, many times, I'm interlinking manually so that I don't jumble up my top navigation menu with too much stuff. Google loves this, but it can be tedious and prone to errors. I interlink posts to posts, posts to pages, but NOT pages to posts. When I do interlink, I use anchor text......

Here's a brief tutorial on Anchor Text and proper backlinks:

- The Definitive Guide to Anchor Text and Backlinks

https://my.wealthyaffiliate.com/training/the-defin...

Okay, but again, having the same old boring (and embarrassing) error page as everyone else can cause you to lose followers, initial visitors and hurt your SEO (time on site).

So, I researched how to customize my 404 page. Check it out:


Of course, there is a search box below and I allowed my sidebar widgets to show on the same page.

So, if you're feeling spry, let me show you how easy this is to setup so that when it does happen people will remember you and perhaps smile just a little!



Join the Discussion
Write something…
Recent messages
ZeeA Premium
Thanks for sharing Peej. If we're not aware yet of the presence of broken link in our site, is there anyway to check it all or we got to check all the link manually?
Reply
EKautz Premium
lol - More great stuff Peej, and very humorous too! Greatly appreciate bro!

ROCK ON!
E
Reply
Shawn Martin Premium
Nice work :)
Reply
PjGermain Premium
Much appreciated Shawn!!
Reply
DHagstrom Premium
Do I just do this within the code for the theme itself, or should this be set up within a child theme?
Reply
BobBarr Premium
Code changes to a theme's files should be done through a child theme. Otherwise, any manual changes that you make will be overwritten whenever the theme is updated. Because of this, you'll need to reenter the changes every time the theme gets updated.

Since a child theme works by overriding the coding in its parent theme, theme updates don't affect those overrides. (Updates only change the parent theme's files; there won't be any updating done to your child theme files.)
Reply
PjGermain Premium
Agreed! Thanks very much Bob !!
Reply
DHagstrom Premium
Thanks to both of you, Bob & PJ!
Reply
kennick2015 Premium
Good post PJ. 404 pages can also be used to send a visitor back to a landing or squeeze page by adding the respective link. Cheers Ken.
Reply
PjGermain Premium
Yep, quite right Ken! Thanks very much
Reply
Top