Skip to main content

How to write 301 Redirects for Websites?

What is 301?

A 301 redirect is a term/process to move your domain to another domain. The 301 - redirect is referred to as a permanent redirect. It is a Search Engine Friendly method and retains your visitors and rankings without causing any harm to your ranking or website. In simple terms it directs the web traffic from one web address to another, without any intermediate web pages.

Why to redirect a web-page?
A web page may be required to be redirected due to the following,
  • The webmaster/owner wants to change the domain name of a website, or
  • The two websites which were different, have to be merged, or
  • If you have to change the names of the files or move the website's pages around.

How many ways can be used to redirect the web page?
There are few ways which can be used to redirect a web-page or a web-address permanently.

1) Meta Refresh Tag - A meta refresh tag can be placed in the source code, i.e. the HEAD section of the web-page where it looks something like,

*head*
*meta http-equiv="refresh" content="0;url=http://www.webpage.com/new.htm"*
*title*page has moved*/title*
*/head*

Note: '*' represents the respective HTML tag.

This method has some drawbacks,
  • Usability Problem - If the redirects happen quickly, then the users cannot get back to the original page. Furthermore, if this refresh tag leads to a non-existent page then the users will leave the website.
  • Other Concern - Refreshing the content leads to confusion in the visitors as to where he is taken to, without being reloading the web-page.
  • SEO Point of View - This technique is used by spammers to trick the search engines, and takes visitors to other page.

2) Create an Error Page - The other method is to create an error page for the web page to be moved for. But this also has it's drawbacks,

  • Lose Ranking - You lose the ranking of the web-page of your site, and hence the traffic, and
  • Lose Visitors - It leaves a bad impact on the user to reach a web page which is leading him to no where, and sometimes it's difficult for the visitors to go and dugg the information for which there were searching for into to the other pages of the web site.

3) 301 Redirect - This is one of the most important, convenient, easy and search engine friendly method to permanently redirect your web page or a web address to a new location. The 301 redirect is implemented in the .htaccess file of the site.

.htaccess - is the default name of directory-level configuration files in the websites hosted on APACHE SERVER. The .htaccess file is placed in a directory, and the directives in the .htaccess file apply to that directory, and all subdirectories thereof. It provides the ability to customize configuration for requests to the particular directory. When the spider next visits your website, it will follow the rule as mentioned in the .htaccess file.

301 Implementation - Now here again we can consider three things,

  • Redirecting a Web-Page
  • Redirecting the Entire Web-Site
  • Redirecting Non-WWW to WWW


a) Redirecting a Web-Page

Download and/or create the .htaccess file.

Download the .htaccess file, which is in the root directory of your web site on the server where all the pages are stored, and/or create a new, if there is no .htaccess file there, create one with notepad. Save that notepad file as ".htaccess" .

Just add the following code,

redirect 301 /old/old.htm http://www.website.com/new.htm

Remember that if there are a bit of codes in the .htaccess file which you have downloaded, then don't manipulate any thing, rather scroll to the bottom and make one line space and add the above code. That's all you need to do. Save it and upload it to the root directory of the website.

Note: Don't add "http://www" to the first part of the statement - just put the path from the top level of your site to the page. Also ensure that you leave a single space between these elements:

redirect 301 (specifies that the page has moved)

/old/old.htm (the original folder path and file name)

http://www.website.com/new.htm (new path and file name)



b) Redirecting the entire Web-Site

You can redirect the entire website using the 301 technique. Just follow the code below to redirect the old domain to a new one or to other domain,

redirect 301 / http://www.website.com/

where, the first "/" indicates that everything from the top level of the site down should be redirected.



c) Redirecting Non WWW to WWW

This in SEO is know as Canoncalization, where both the non-www and the www versions of your website are being indexed. The code below shows to direct all non-www traffic to www. Add the following to your .htaccess file.

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


Make sure that the links to folders always end in a trailing / if there is no filename after that link.

For FrontPage users: in addition to the above, also change the .htaccess files in:

_vti_bin
_vti_bin /_vti_adm
_vti_bin/ _vti_aut

Replace "Options None" to "Options +FollowSymLinks"





Some Useful Links



Interesting Posts

Most Read SEO Articles

Comments

Sir,

I have just purchased a custom domain name. My hosting is free under Blogger/blogspot.

As per GWT, i got 404 not found craw errors, and its about 483 linked pages. Can I fix this using 301 redirect? Is there a way to do it at one time only?

Please help me.
I've bookmarked this page so i could see your reply.
Thank you in advance.

Popular posts from this blog

List of 100 Article Directories

An article is an essay or a research on a particular topic. Article provides a lot of exposure to your business and very high relevant traffic to your website. Other than providing the quality traffic, article submission has SEO benefits also, it gives a valuable back-link to the website. So here we go with the list of 100 Article Submission websites, "BEST 100 ARTICLE DIRECTORIES" S.No. ARTICLE DIRECTORY PR SUBMISSION PAGE STATUS 1 MAGPORTAL 7 Submit Article SIGN UP 2 EMEDIAWIRE 6 Submit Article SIGN UP 3 EZINEARTICLES 6 Submit Article SIGN UP 4 GOARTICLES 6 Submit Article SIGN UP 5 WEBPRONEWS 6 Submit Article SUBMIT 6 ARTICLEPOOL 6 Submit Article SIGN UP 7 MARKETINGSOURCE ARTICLES 5 Submit Article SUBMIT 8 ARTICLEMOTRON 5 Submit Article SIGN UP 9 ARTICLESON 5 Submit Article SIGN UP 10 ARTICLESBASE 5 Submit Article SIGN UP 11 BUZZLEARTICLES 5 Submit Article SIGN UP 12 ARTICLEALLEY 5 Submit Article SIGN UP 13 ARTICLE DASHBOARD 5 Submit Article SIGN UP 14 WEB-SOURCE 5 Submit A

Optimizing Your Website for Local Searches: A Local SEO Guide

Local SEO Guide In today's digital landscape, local businesses must prioritize their online presence to attract and retain local customers. One of the most effective strategies for achieving this is by optimizing your website for local searches. In this comprehensive guide, we will explore the key steps and best practices to boost your local SEO and ensure that your website ranks prominently in local search results. The topics covered in the local SEO guide are listed below,   Understanding Local SEO Keyword Research for Local SEO On-Page Optimization Techniques Website Localization Google My Business Optimization Local Link Building Strategies Mobile Optimization for Local Searches Online Reviews and Reputation Management Social Media for Local SEO Tracking and Measuring Local SEO Performance Please comment if you feel something is missing! Understanding Local SEO Local SEO refers to the practice of optimizing a website and online presence to increas

List of 100 Top SEO Forums

Forums are online communities which provides the users to hold discussions, ask/research (already posted) questions, on the world wide web. Generally speaking forums are another name for discussion boards, or message boards. They enables the users to share, discuss or put the questions based on the theme of the websites. Benefits of Forums There are several benefits for which the forums are used, It's an online community where the users of the websites, can interact with the other users, and exchange tips and place questions based on the theme of the website. They save the information posted, and makes it readily available for the others to read the post. The posts get to read again and again, and the user can post the reply to the already placed post. Forums also allow to increase traffic to your website through repeated visits, gain creditability & build relationship with visitors. It also acts as a kind of Direct Advertising, that increases the ROI. There are large number of

How to create XML sitemap for your Blogger Blog Manually?

How to Create XML sitemap for your Blogger Blog Manually? Creating an XML sitemap for your Blogger blog can be done manually by following these steps: Open a text editor Open a plain text editor on your computer, such as Notepad (Windows) or TextEdit (Mac). Start the XML document Begin by typing the XML declaration at the top of the document: Add the root element Below the XML declaration, add the root element for the sitemap:     Add URL entries For each page of your blog, add a URL entry within the tags. Here's an example for a blog post: Replace "https://yourblog.blogspot.com/your-blog-post-url" with the actual URL of your blog post. Use the tag to specify the date of the last modification in the format YYYY-MM-DD. indicates how frequently the page is likely to change (e.g., "always," "hourly," "daily," "weekly," "monthly," "yearly," "never"). represents the priority of the page on a scal

Contact Us

SEO Blog will be delighted to provide any sort of web marketing assistance. Contact us for all your SEO related queries at, tusharvickkie (at the rate) gmail (dot) com Remove spaces and braces with the respective symbol in order to contact to SEO Blog. We love to hear from you.

Local SEO Guide

Local SEO Guide
The Local SEO Guide - the key steps and best practices to boost your local SEO and ensure that your website ranks prominently in local search results.