Sometimes you encounter a few HTTP errors with your website. These errors can be 301,404 etc. and you wonder what are all these numbers about or how they are created. Even I had no idea why we get these types of HTTP errors on our website when I saw them for the first time.
So let’s now understand here why these errors occur and if they are search-engine friendly or not. Here we focus on some important HTTP errors which we see frequently and which every digital marketer must be aware of.
what is the 301 error page in SEO:
301 error is simply taken as Permanent URL redirector indicating a number. If you no longer want to use an already indexed page or link, then go for 301 redirections. It just shows search engines that this page or URL does not exist now and new data is updated.
So when a visitor visits that page with 301 errors, then he can see the new updated link displayed on the page indicating him to click on the updated url.301 permanent redirection is considered as the safest option and more search engine friendly as search engines recognize it easily
301 redirection will not cause any harm to your website reputation and transfers the old page authority, backlinks, link juice to the new page if the redirection is done properly following webmaster guidelines.
One best 301 redirect .htaccess example is redirecting your domain from HTTP to https or vice versa. Another example is redirecting your sub-domain to the main domain if needed.
301 redirect generator:
For implementing 301 redirects on the website which is hosted on Apache servers, you should access your server .htaccess file. For detailed information on .htaccess files check Apache HTTP server tutorial
If you are unsure of accessing these files or if your server is running with some other software than Apache, then you should definitely ask your hoster for more details. Also if you don’t have the good coding knowledge it’s better to ask support from hoster as incorrect changes in code can break your site too.
You can do redirection yourself too easily with 301 redirect htaccess generator. All you have to do here is just enter the old and new file or directory name. Then it automatically generates the 301 redirect code in the .htaccess file. Put this new code in the place of old page code in the File Manager.
Webpage redirection code of HTML, PHP, asp, aspx files, IIS web.config can also be generated using this 301 redirect generator. It also recommends where to place the redirect code and other redirect options.
There is also a possibility of 301 redirects inside your C-panel. Do check all the options carefully before proceeding and contact hosting customer support if 301 redirects is not working as expected.
How to fix 301 moved permanently:
First, let me know how do you feel if your home page shows as HTTP/301 permanent redirect even if you have done nothing to get it. Surprised right! Yes, if at all there is a situation like this, then first check your .htaccess files. If all files are perfect then go to the next step or if you find any error do fix it contacting the developer.
Now let’s assume your .htaccess files are fine, then how to resolve this 301 moved permanently error. There is a way to do this, just check your website version if it’s redirecting to www or non.www
If there is a change in your preferred version, you may face this error. So immediately go to your WP admin area and save the desired settings for WordPress and site version. Once done fetch it on the console and check the status.
Still, if 301 errors display on your website, then contact your hosting service for immediate action as it’s not good to your website to show this error on the website for a long time.
Now as you understood about 301 redirects, let’s quickly move on to know what is 302 error In SEO
what is 302 redirect in SEO:
Like 301 which is a permanent redirect, 302 is a temporary redirect to a page or URL. Search engines understand the response code 302 is temporary redirection and so displays the alternate URL for the website visitors.
Unlike 301 redirects, 302 redirects may or may not carry the page authority and link juice to the new page or URL(can’t say). Search engines normally don’ trust temporary redirect as it changes occasionally. So preferring permanent redirect is recommended.
In the webpage, it doesn’t display 302 error directly but the visitor can see the Location header field in the server response. This field has hypertext with the destination URL hyper-linked with it.
But Google gets confused with 302 redirects and the site may not be visible in the results and leads to no traffic and a huge loss.
Simple 302 redirect example is when a visitor visits your website http://domain.com, web server configuration can redirect him to https://domain.com temporarily for one request.
How to fix 302 moved temporarily error- server-side:
- Check your web server .htaccess file to find the reason why it’s returning 302 response code from server-side and fix the code issues.
- Outdated web server software can also be the reason for 302 error, so check with your hosting provider for more details.
310 vs 302:
[table id=2 /]
what is 307 error:
HTTP 307 temporary redirect status response code indicates that the requested resource is moved temporarily to the location headers. So here also your URL is redirected to another temporary URL.
Here the body and method of the original request are reused to perform the redirected request.
307 response code is cacheable only by a cache-control or Expires header field.
How to fix 307 error:
If you see 307 error then is some issue in redirection chain. Either the webserver software is defective or webmaster has not set up redirection rightly. You need to check the server and webmaster to fix the issue.
307 vs 302:
[table id=3 /]
302,307 error response web behaviour is the same for the GET method.
3XX redirect rules for SEO gives a clear understanding that redirecting can either increase or decrease your website traffic and is not recommended unless it is absolutely needed.
Let’s now proceed to know what is 404 error on Google and how to fix it.
what is 404 error in SEO:
When the user’s request is not found in the web server, then it returns 404 error page not found to the user. 404 can be due to the wrong URL entered by the user and also the existing web page requested by the user might be removed or redirected.
404 error is a broken link for Google and doesn’t like it as it provides the bad user experience. So for good user experience, redirect the user to the new URL homepage or place a custom search to find the content the user is looking for.
Here is the best 404 error page sample to make it user-friendly by giving redirections to the visitor.
How to fix 404 errors:
As 404 errors hurt SEO due to the increase in the bouncing rate of the web-page and bad user experience, you need to fix these errors immediately. Also, the web crawlers find it difficult to crawl the websites with a lot of 404 errors
First, you have identified which pages or links showing 404 errors in the website with tools like the Broken-link checker, screaming frog etc. After finding the errors, now let’s check how to fix these errors with the below methods:
- Change your WordPress-permalink settings. Select the post-name option in the settings and click on save changes.
- Manually update the .htaccess file in the word-press directory by logging into C-Panel. As these are code changes, you can take a backup of the original file before making any change in the code to reduce the complications.
If you can’t find the .htaccess file then search for some hidden files in the directory.
( Image source )
- If you are using WordPress on the local servers, to enable permalinks you have to turn on rewrite module in WAMP, XAMPP or MAPP installation of Apache configuration. Check here guide on how to enable custom permalinks in WordPress local server.
- You can also redirect the 404 error page permanently to the new URL with 301 redirections using a free WordPress redirect management plugin called redirection
Next, let’s understand another 4xx error i.e. why 410 error occurs and how to fix it.
what is 410 error:
410 in google terms is ‘removed permanently or gone’. When the requested URL or page is permanently deleted, the webserver returns 410 error indicating the URL or page is dead and not available any more on the server.
A simple example of using 410 error-If you had stopped selling a particular product or service permanently, you can show 410 error on that particular page. To customize the error page, you can mention other products or services you offer on the same page without redirection.
How to fix 410 error:
Web servers do not return 410 error generally. It has to be manually done by removing the error code in the .htaccess file.
410 vs 404:
[table id=4 /]
Sometimes 410 error is better than 404 as Google bots crawl 410 error pages only once and so de-index these pages with a no-index meta tag for good user experience.
Here we covered only a few errors which are faced frequently and which affects SEO. Share with us by commenting here if you have faced any other errors on your website.