Here is a rock-solid fact: we – all of us – are losing a considerable amount of valuable search engine traffic due to non-existent content or incorrectly configured redirects. This is why efficiently handling redirects and 404 errors is very important for your SEO success.
As a first step, let’s discuss about …
1. Redirects
So, what is a redirect on a website?
Redirection is the process of forwarding one URL to another URL. A way – and a common practice – to send both search engines and users to a different URL from the one they have originally requested.
The logical question arises: why do we need redirects? Well, there could be many different reasons, but here is a tiny list with the most common ones:
duplicate content; when you have multiple versions of the same content, it can be difficult for search engines to determine which page is the correct one
multiple domains; purchasing multiple domain names has become a quite common practice in these days; a lot of businesses do this to protect their online brand, to get additional traffic from common misspellings or simply to prevent competitors from buying similar domains
changed domain name; sometimes it happens (for example, re-branding, acquisitions, etc) and obviously you don’t want to lose any of the hard earned incoming links you have built
cleaning up dynamic URLs; when you have dynamically generated URLs, it’s always a good idea to make a redirection to a shorter SEO-friendly version
redesigned websites
newly acquired security (SSL) certificate; in this case your URL will start with “https://” instead of “http://”
redirecting to files with different extensions; you may need to redirect the browser from the requested HTML file to a PHP version of the very same web page
removed or replaced content and/or web pages
redirecting specific files or folders from one domain to another
expired content
product pages with discontinued or temporarily unavailable products
shortened or masked affiliate links
And so on. As you can see from the above examples, we are talking about pretty heavy issues here. Not using redirects or using the wrong ones, can – and usually will – have serious consequences.
I am going to give you only one simple example: let’s assume that you have created a redirect which will automatically send the users and the search engines from yourdomain.com to yourdomain.com/blog; if something goes wrong and the search engine won’t be able to follow the redirect, most likely will assume that yourdomain.com has no content at all! and as you can guess, a similar scenario won’t help you to get better ranking …
There are 3 main types of redirects:
301 – moved permanently; recommended for SEO; indicates to both visitors and search engines that the page has moved permanently; the search engines will carry any link weighting from the original URL to the new page;
302 – moved temporarily; they are not treated as permanent changes, therefore these redirects wont pass the rankings and the search engine value like a 301 does; you should use it only if – for some reasons – you don’t want to transfer the link values from the old page to the new URL
meta refresh; these are redirects executed on page level rather than server level; not recommended for SEO
OK. Now, let’s see the most common methods that can help you to implement a URL redirection,
1.1 Simple PHP code
1.2 .htaccess redirect
First of all, let’s clarify what is an .htaccess file! Is the short form for “Hypertext Access” and it’s a web server configuration file used by Apache-based web servers in order to indicate who can or cannot access the contents of a given file directory. It was introduced mainly as a directory-level user authentication method, but over time has become a powerful configuration tool that can be used for many purposes.
This course is not about .htaccess, so I won’t go into details, but you should know, that even the slightest syntax error can have disastrous consequences, so if you are not 101% sure about what are you doing, probably isn’t a very good idea playing around with your .htaccess file! Also, keep in mind, that we are talking about a hidden system file (is hidden with a reason!), so make sure your FTP client is configured to show hidden files.
The .htaccess file can be created and/or edited as a regular TXT file, using a common text editor. It’s a good idea to name it “htaccess.txt” and rename it later – once has been uploaded to your root directory -, because many FTP applications or operating systems are unable to view or read .httaccess files.
OK, enough with the chit-chat, let’s see how can you make some redirects via .httaccess:
Again, pay a great attention to the syntax! A forgotten comma or a missing space is enough to create an epic mess or even to crash your site! If you have any doubts, you should always use a different redirection method or at least a free online .htaccess creator that can help you to avoid any potential syntax errors.
Here are 2 easy-to-use free options for you ...
BeamUsUp
http://beamusup.com/generate-htaccess/
htaccessredirect.net
https://www.htaccessredirect.net/
1.3 Plugins
And of course, if you hate messing around with coding, you can always use a redirection plugin.
My recommendation:
https://wordpress.org/plugins/redirection/
One more thing ...
If you are running an e-commerce website, most likely you are going to have temporarily unavailable or permanently discontinued products. In these situations you’ll have to provide user- and search-engine-friendly alternative pages and each problem must be managed differently:
temporarily unavailable products; evidently, removing the page is not an option, so you’ll have to create a separate friendly page to clearly state that the product is unavailable, and to provide all the relevant information the visitors may need; you should include the item’s planned arrival date, a pre-order option, a list with similar products and most importantly, you must give your customers an option to get notified when the item arrives
permanently discontinued products; in this case you have two options: to use a nice custom 404 page for pages that don’t have too many backlinks, or to use a 301 redirect – to a similar item or a relevant product category – for pages that serve as entrance points, have many valuable backlinks or ranks well for organic search queries
GREAT! Now, that you know a few things about redirects, let’s check out the second problem, the 404 errors …
2. 404 errors
So, what are these 404 errors?
The 404 error is an HTTP status code which means that the requested web page could not be found on the server. This client-side error can be caused by many different reasons, such as broken links, incorrectly typed URLs, moved pages, deleted content, .htaccess problems, wrongly configures SSL certificates, memory limit issues, etc.
In these situations you’ll have to use a nice custom 404 page to kindly redirect your visitors to a working page – usually the homepage or another content-related page – on your website. Not having a 404 page and displaying a simple “page not found” message will have a huge negative impact on your users’ experience.
And basically, this is the point where the 404 errors are becoming important. From a strictly technical SEO standpoint 404 errors aren’t really disastrous. In short term they won’t negatively impact your SEO efforts, but if there are too many and they persist, sooner or later your website will be abandoned by many frustrated users, and then my friend you may not continue ranking so well …
You’ll have to focus on two issues:
2.1 Finding and fixing the existing errors
First of all, you need to understand that there are two different situations: 404 errors encountered by human visitors and 404 errors encountered by search engines. Obviously, the search engine bots will encounter many 404s that human visitors will never get to. This is because they probably will crawl just about anything on your site, even links or pages which are invisible or inaccessible for human visitors.
The best way to identify the 404 error pages that search engines may encounter, is by logging in into their own webmaster-tool platforms to access the indexation reports, in which they will tell you which 404s they encountered. In your Google Webmaster Tools account check out the “Crawl -> Crawl Errors” section, and in your Bing Webmaster account go to “Reports & Data -> Crawl Information”.
Identifying the 404 errors encountered by human visitors is perhaps even more important. Don’t worry there are many useful tools that can help you to find the problematic URLs.
Fore example ...
DeadLinkChecker
https://www.deadlinkchecker.com/
And of course, we have the usual plugin-based solution.
I strongly recommend you to use the MonsterInsights plugin, which is the most powerful Google Analytics plugin for WordPress sites and it’s definitely a MUST for WordPress-based websites.
MonsterInsights will automatically tag the 404 pages for you and if you go into your Google Analytics account you’ll find a ton of useful info about your 404 errors. All you have to do is to select “Behavior -> Site Content -> Content Drilldown” and search for “404.html”:
If you have problems while you are trying to identify and to solve your 404 errors on a WordPress site, you should use the 404-error-monitor plugin which logs 404 errors and 404 to 301 or all-404-redirect-to-homepage to redirect your visitors to another page whenever a 404 error occurs.
OK, let's assume that you have managed to fix your 404 errors in one way or another.
At this point another logical question arises ...
How often should you check your website for 404 errors?
Well, if you want to make a successful SEO for a WordPress website, I recommend you to do it at least once per month and if you have a complex site structure with frequent changes or content updates, you should probably do it every week. And of course, don’t forget to update your sitemap(s) every single time!
Finally, one last piece of advice: if you have changed your main domain, you’ll have to find a way to inform all your “partner” sites, so they can change the referring URLs, otherwise your precious inbound links won’t work!
OK. Now let's see the second issue ...
2.2 Creating an outstanding custom 404 page
Let’s face it: mistakes will always happen and probably it’s impossible to totally prevent the existence of these 404 errors. This is why having a user-friendly custom 404 page is a MUST for any website.
A nicely branded custom 404 page will help your visitors to find the information they are looking for, as well as providing other helpful content recommendations and encouraging them to explore your site further.
Here are some suggestions for creating an effective 404 page:
tell your visitors clearly that the page they are looking for cannot be found
it’s always a good idea to provide a way for visitors to report a broken link
use the same look and feel as the rest of your regular website
you may add links to your homepage or other highly relevant content pieces
realize it’s an inconvenience to your visitors, apologize for the situation and give them some useful and relevant information if you can
tell your visitors what you want them to do next in order to find what they were looking for
use a friendly language and don’t be afraid to use humor too
The point: you need a simple, yet useful 404 page to improve the user experience and to help both visitors and search engines to find what they are looking for.
And yes, you can use some handy plugins to easily create some nice custom 404 pages. Here is a free, reliable option for you:
https://wordpress.org/plugins/custom-404-pro/
COOL. Now, that you already know a few things about redirection and 404 errors, we can move forward to discover other important factors that will help you to make a successful SEO for a WordPress website. In the next lesson I will show you 5 important development considerations that will influence the accessibility of your site.