301 Redirects Search Engine Optimization

Search Engines and Missing Pages

Missing pages or moving the pages without telling the search engines can be very bad for your site rankings. Your traffic may decrease. Visitors can get pages with "Error 404 - File not found" which can be bad for the overall popularity of your site. 

You can create a custom error page. The problem with this solution is that:

a) You will lose rankings on the next search engine update as the file will appear to be non-existent. It could be some time before the page in it's new location or with a new name reappears.

b) Your website visitors may be frustrated by the fact that they then have to dig through your site to find the desired information.

Solution 2 - 301 Redirect

A 301 redirect is the most widely used efficient search engine bot and visitor-friendly solution for the websites that are hosted on servers running Apache . It is the most common and safest solution when moving pages around your website.

301 redirect has to be used in your .htaccess file that lies in the root of your server. There are special plugins that will automatically redirect search engines when you change the url of the page. 

What is a .htaccess file?

When a visitor/spider requests a web page via any means, your web server checks for a .htaccess file. The .htaccess file contains specific instructions for certain requests, including security, redirection issues, and how to handle certain errors.

What is a 301 redirect?

The code "301" is interpreted as "moved permanently". After the code, the URL of the missing or renamed page of your website is written, followed by a space, then followed by the new location or file name of the page.

How do I use a 301 redirect?

First, you have to create a .htaccess. You can just upload some text file for example mysite.txt to the root of your server (if you have a CMS system site you have to put the a .htaccess into the public_html folder). . If there is no .htaccess file there, you can create one with Notepad or a similar program. Use the ftp program for uploading. After that just rename the file to a .htaccess without the ending.txt because .htaccess does not have any extension like .txt . jpg . gif …………

It should look like this

 ALso be sure to check the detailed explanation of 301 redirect in this 301 redirect article

If there is already .htaccess on the server be careful not to remove and existing text. Just scroll down past all the existing code, leave a line space, then create the following 301 redirect code:

redirect 301 /old/old https://www.you.com/new

It's as easy as that. Save the file, upload it back into your website server and immediately test it by typing the old web address into url and it should be automatically redirected to the new page.

CAUTION: Do not add "https://www" to the first part of the statement - just put the path from the top level of your site to the page for example like this

/seo/redirects/redirect301.html. The whole code should look like this

redirect 301 (the instruction that the page has moved)

/old/old (the original folder path and filename)

https://www.you.com/new.htm (new path and file name)

Redirecting websites with 301 redirect

You can also redirect not just a single page of your website but also the entire site, for example when you decide to change the domain names of your site e.g.

redirect 301 / https://www.yournewdomain.com/

The first "/" indicates that everything from the top level of the site should be redirected. As long as you are using the same paths and filenames, then this option is a very simple way to perform site redirection in the situation where you have only changed your domain name.

Canonical issues and solution: www vs. non-www

On many search engine forums, canonical issues with the website can be found. Each website has both the www and non-www versions of your pages listed in a search engine. This could be the cause of the duplicate content penalty by search engines. SO the following thing can be done. This example is where you wish to direct all non-www traffic to www:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]


Ensure that all your links to folders always end in a trailing / if there is no filename after that link.

Caution: test, test and test again immediately after making changes. If there are problems you have to recheck the code in .htaccess file.

Search engine spiders & 301 redirects

The 301 redirect is the safest way to keep your rankings. When the search engine bots/spiders visit your site again they will obey the new code in the .htaccess file and visit the redirected pages.

In the next update of the search engine index, the old url file name and path *should* be dropped and replaced with the new url address. Sometimes you may see both addresses old/new file names during the transition period, but that is not permanent. Do not freak out - this is a normal process and may take a number of weeks before everything is back to normal; but the bottom line is, any change you make has risks. Search engines have their own rules and those can be changed anytime.

If you're changing domain names and using a 301 redirect, you have to leave the old domain name and files intact for a few weeks to give time to search engine spiders to accept the changes. Also, notify the people who are somehow correlated with your website. After the process is finished you can remove the old files and domains.

Also, be sure to check the detailed explanation of 301 redirect in this 301 redirect article

great post man

thanks for posting this

amazing

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.