It’s important to have relevant and fresh content on your website. That sometimes means your content may change, how do you let site visitors know what to do? HTTP status codes will help.
This post is a quick guide to three of them and explores the basics of what they mean, as well as when and where they might be used. It doesn’t delve deeply into why or specifics for implementation. If you need help or have questions, please contact me.
What are status codes?
Status codes are sign posts that let both computers and site visitors know what to do. Each time a webpage is accessed, one is returned. Most happen without any action on your part, for example, when everything is ok that sends a 200 response.
Some of the codes can help your web browser or a search engine know what to do or how to categorize a specific page. They are often called “error codes” and that is true for some but not all of the codes.
This post will explain three specific responses: 404 “Not Found”, 301 “Moved Permanently”, and 410 “Gone”. The first is the most well-known and used. There are many more codes, and they are outside the scope of this short article.
Status Code – 404 “Not found”
This is an error code used when a web page isn’t available. It can happen for a variety of reasons — a typo in the URL, the page isn’t published yet, or it was deleted.
A well-crafted 404 page should state the page wasn’t found. It’s a common — and beneficial practice — to also include helpful ways to find other information on the site. I like to include a search form and a link directly to a blog or display several popular or recent posts. The goal is to help site visitors find what they were looking for.
While cute images can bring a giggle and help make your site memorable, please also include useful information! If you use an image don’t forget its alt text which is helpful for everyone.
Traditionally in WordPress this was a page created by your theme developer. With the rise of Full Site Editing (“FSE”) it’s now possible for you to take control of this page yourself. If your theme doesn’t yet support FSE, then you need to continue editing that page in the traditional manner. If you need help, please reach out.
Status Code – 301 “Permanent redirect”
This is the second most common code my clients experience and implement. A permanent redirect is for when you need to send a site visitor to a different page. Using 301 redirects help you to move your site traffic along and don’t require any action by your site visitors, though you need to configure it. Common reasons include redirecting for HTTPS, an edited blog post that has a new link, the desire for an easy to remember URL, or several old posts are merged into a single new one.
That final use case is what I implemented after I revised my phishing posts. As an aside, I like to create a note at the bottom of the revised post that explains it’s updated and if it includes consolidation of other posts.
There are several plugins to help you create and manage these redirects if editing the htaccess file is not something you wish to do and you don’t want to contact me. The section “Additional Resources” at the end of this post link to those my clients like best.
Status Code – 410 “Gone”
This code isn’t a common one for many websites. It’s under-appreciated; I didn’t bother with it for years, relying instead on 404 pages. Recently, I began to adopt it in my own site clean-up. It is used when something is permanently deleted and should be removed from search engines.
When might you use it? In my case, between April 2014 and June 2016, I often published semi-regular posts sharing links I found. I would write a sentence or two about a range of different topics and links. Today search engines categorize these types of posts as “thin content”, they have empty calories, and aren’t posts that add anything of value, even if they are interesting. Today I sometimes share this sort of content in my newsletter instead. My solution was to delete all the posts and created a 410 status for each.
When someone follows one of those old links, they now are directed instead to my Gone, error 410 page. Yes, it’s similar to my 404 page. Hopefully soon, search engines will remove those posts from their index. If you search within my site, they aren’t in the results. However, others may have once created links specifically to those pages and someone may try to find it. Would a 404 page solve the problem? Probably. But to me this is a neater way to clean up the content.
If you’re using WordPress, this requires a bit of technical work that is outside the scope of this post. If you would like guidance for different ways to implement this error code, please contact me.
Note: There is also a code (451) if a page was removed for legal reasons.
- List of HTTP Status Codes (Wikipedia)
- Update or delete? Cleaning up old content on your site (Yoast SEO)
- Beginner’s Guide to Creating 301 Redirects in WordPress (Step by Step) (wpbeginner)
- Thin content (Google Search Documentation)
- Redirection WordPress plugin
- pretty links WordPress plugin