Technical SEO

How to Fix 4xx Errors

A 4xx error means that a webpage cannot be accessed. This is usually the result of broken links.

By
Jace Thomas
.
July 1, 2022

About this issue

A 4xx error means that a webpage cannot be accessed. This is usually the result of broken links. These errors prevent users and search engine robots from accessing your webpages, and can negatively affect both user experience and search engine crawlability. This will in turn lead to a drop in traffic driven to your website. Please be aware that crawler may detect a working link as broken if your website blocks our crawler from accessing it. This usually happens due to the following reasons:

- DDoS protection system

- Overloaded or misconfigured server

How to fix 4xx errors

If a webpage returns an error, remove all links leading to the error page or replace it with another resource.

To identify all pages on your website that contain links to a 4xx page, click "View broken links" next to the error page.

If the links reported as 4xx do work when accessed with a browser, you can try either of the following:

- Contact your web hosting support team

- Instruct search engine robots not to crawl your website too frequently by specifying the "crawl-delay" directive in your robots.txt

What is a 4XX Error?

A 4XX Error is an error that often occurs when a webpage doesn’t exist or has restricted access or rights. These type of errors often occur from misspelling the URL. As a result, the page cannot be found or, the site or page could not be reached. If a page is not valid, the message cannot be exchanged between the web page and web server, and as a result, a 4XX Error is presented.

A Guide to HTTP 4XX Page Errors

What is a 400 Bad Request Error?

When you submit a request to the website server to load a webpage, if it is somehow incorrect or the request is corrupted, the server can’t understand it and a 400 Bad Request will be presented.

A ‘400 – Bad Request’ occurs when you submit a request to the website server that is incorrect or corrupt. As a result, the server receiving the request cannot understand it. Although unlikely, it is possible that the problem may fall on the website itself. In which case, there won’t be anything you can do about that.

Like a ‘404 – Not Found’ error message, 400 pages can be customised.

What is a 401 Unauthorized Error?

A 401 HTTP error code indicates a request sent by the client that could not be authenticated. This may be due to the client not issuing the correct credentials with their request, the client is banned for some reason, or the server has rejected the client’s credentials.

What is a 403 Forbidden Error?

This error message is shown when you try to access a page or resource that is strictly forbidden for some reason. You will usually be presented with basic troubleshooting instructions.

What is a 404 Not Found Error?

Broken links on a webpage will present the user with a code 404 error page, preventing them from being able to access the subsequent page. The 404 error ‘page not found’ is usually explained by the URL for the link being incorrect, or having been removed from public view. Equally, a 404 error may occur if a website has moved a page or resource but failed to redirect the old URL to the new one.

It’s important to recognise that a 404 error indicates that the server is reachable, however, the specific page you are trying to reach is not.

How to Fix a 4XX Error?

  • Check the spelling of the URL, have you mistyped it? If the site address has been spelt incorrectly, it is likely to struggle and return a ‘404 – Not Found’ error.
  • Clear your cookies and cache. Your web browser may be trying to use invalid or expired cookies. It is possible that your browser has cached a corrupt version of the web page you are trying to reach and as a result, a 400 – Bad Request is returned.
  • It could be the receiving server. Some servers aren’t configured to return more helpful messages. For example, let’s say you upload a file to a website but the file is too large. Instead of showing a prompt that the file exceeds the maximum upload file size, the server sends a 400 HTTP error.
  • Refresh the page. It’s kind of the same thing as turning something off and back on again. It doesn’t always fix the problem but it is worth a shot. Just hit ‘F5’ on your keyboard and your web browser will reload the page. Similarly, if the problem continues to persist, try restarting your computer.
  • Try a site search. A mistyped URL may not always be easy to spot if the slug uses numbers and symbols. If you type in your browser ‘site: ‘keyword’,’ the search results should return the page you are looking for. This is also a useful way to find pages that may have new URL’s.
  • Check out other websites. If you are consistently being presented with an HTTP error code, the problem may lie with your computer or network equipment. Try visiting some other websites to see if you’re still presented with a 4XX HTTP error.
  • If you are trying to login to a protected area, ensure you are using the correct URL. URLs can be updated or may change so if you have bookmarked a page in your favourites, it may no longer work because the URL is different and a redirect does not exist. It’s also important to make sure you are using the correct login credentials as this may cause you to be presented with a 401 error message.

4XX Errors and their negative effect on SEO

When a link within your website (internal link) or a link that points to your website from another site (external link) is changed, removed or not functional for any reason, we say that that link is broken. What this means is that clicking the link will not result in the retrieval of relevant content. Instead, what comes up, as a result, is a 4XX Error message. This message most commonly says something along the lines of “400: bad request” or “HTTP Error 400.”

Internal Links

The importance of fixing broken internal links

From an SEO perspective, it is important to fix broken internal links because they prevent Search Engine crawlers from being able to accurately index your site. Moreover, from a business perspective, if you have broken links it makes your site look amateur, and this will make your business look amateur. When an error page comes up, particularly a generic one, your visitor and potential customer will often leave a lot quicker than they came.

How to fix broken links?

Fortunately, Google Webmaster Tools allows you to easily track and graph broken links. To do this, visit your Google Search Console in your GWT account and find Crawl > Crawl Errors. Using this free tool, you can start looking at trends over time to figure out what specifically may be causing the broken links in your campaign.

This covers you being able to find the broken links, but you will need to find exactly how much traffic you’re losing as well. You can do this by using a Google Analytics Tracking Code. This will give you insights into which broken link has been clicked and to which page error the user has been referred.

 

External Links

Why you should fix broken External Links

External links, also known as inbound links, can be broken for a number of reasons. It may be that you have changed the URL or location of the content, or even something as simple as a misspelt link. The result, much like broken internal links, is negative for both your rankings in the search engines and your visitors' experience.

How do I fix external links?

You first must identify the broken link. As with internal links, check the crawl errors in your Google Webmaster Tools account and find the number and source of your broken external links. Once you have identified where the broken link is coming from, you should contact the webmaster in charge of the external site. If for whatever reason you cannot contact them, set up a 301 redirect to your original article. Google will thankfully transfer any beneficial index value from your broken link to your current one.

Keep Your Link Juice Flowing

‘Link Juice’ is known as the currency of Google and is used in search engine algorithms to determine the rankings of a website or webpage. Pages are connected by links and the juice flows from one to another. If there is a broken link, then the fluidity of the link juice stops and link juice is lost. This can greatly affect your website's rankings and devalue the user experience of the website, reducing future website traffic.

By creating a custom 404 error page, you are able to redirect the user back to either the homepage or the previous page to get them back on track. Although the user is presented with a problem, they are able to easily navigate back around the website without having to start the process all over again. In redirecting your visitors back to other web pages, the website is able to retain a level of link juice that would have otherwise been lost. The more inbound links that are associated with a web page helps to increase its rankings, so removing or changing page filenames has to be carefully thought out.

Why You Need a Custom 404 Page

A 404 page serves as a notification to the visitor that the page could not be found, whether as a result of a faulty link or even just a typo. What you want to do as a webmaster is create a custom 404 page. This does a couple of things. Firstly, a custom error page is a much more user-friendly experience. The visitor is given the impression that the site is still active, as opposed to a generic page which suggests it may not be. More importantly, however, a custom 404 page can help your user find exactly what they were looking for, which, if you have many broken links, will save you a lot of traffic. Google has some good tips on creating a useful 404 page.

The Benefits of a Custom 404 Page

Broken Link Software will probably be supplied by most SEO companies, and will include some sort of broken link checker that carries out regular check-ups on your links and will notify you if there are any problems. In some cases, such as Wordpress, Drupal and Joomla, there may be an inbuilt extension that you can use to automatically check for you.

Explicitly for PCs, Xenu is an available free download that can be installed to also provide checks. However, this has not been expanded to Macs as of yet.

We also recommend you upload Google Webmaster Tools onto your website. Webmaster Tools can offer you extremely useful information about many factors, including broken links within your website and from external resources, for free.

How to Create a Custom 404 Page?

This can vary depending on the platform your website has been created in. We would suggest that you ask your web developer to set this up for you, but generally, the .htaccess file is used. 

Step 1. A 404 page does not exist, the error you receive is a basic standard error report that the server is set up to show. So, the best thing to do is design and create your 404 page first. We would generally call this file ‘404’.

Step 2. Use your website FTP credentials to log into your server and see if a .htaccess file exists in the root. There should already be one there; if not, create one. To create one, open notepad or a text editor and save the file as .htaccess

Step 3. Add the following to your .htaccess file:

ErrorDocument 404 http://www.your-domain.com/404.html

This tells the server that if a document is attempted to be accessed but does not exist, to redirect them to the custom 404 page you created earlier. Just remember to replace your-domain.com with your domain name.

Written by
Jace Thomas

We can prove that we're right for you.

Drive high-ticket aesthetic and body contouring package sales.