Web Development Network  |  Sites:    Capital Tutorials    Internet Marketing Books    Arcade Games
Depiction- Webmaster Resources
Stock Image


Contributors: SSD VPS in Europe  |  SEO Las Vegas |  EsqRank

Dental SEO Marketing  |  Best Las Vegas SEO Company  |  Currency Converter Live

Misc Links: Submit Tutorials (Earn $$) l Advertising l Privacy Policy | Site Map

Tutorials > .htaccess > 301 Redirect

 

Use a 301 redirect to tell search engines and humans where to find a new page.


If you need to move a page or a whole website, a 301 redirect is always recommended. If you just change a file name or delete a page, you may lose search engine rankings that were associated with the old page. By using a 301 redirect, you can tell search engines and humans where to find the new page. This can also be used to force all traffic to be directed to www.domain.com from domain.com, helping increase your website's pagerank and ranking in search engines.

Avoid using a meta refresh tag as this is a technique used by search engine spammers to rank well for certain keyphrases that are totally irrelevant from the page redirected to. Many search engines filter out the meta refresh tag, so it is not a search engine friendly option.

What is 301 redirect?

301 redirect is the best method to preserve your current search engine rankings when redirecting web pages or a web site. The code "301" is interpreted as "moved permanently". After the code, the URL of the missing or renamed page is noted, followed by a space, then followed by the new location or file name. You implement the 301 redirect by creating a .htaccess file.

Implement a 301 Redirect on Apache Servers

1. Open your existing .htaccess file. If you don't already have one, open Notepad and save a new file as .htaccess without and extension.

2. Add a version of the following after the last used line in the file. After adding this line, save the file and upload it to your main html directory, normally public_html.

redirect 301 /oldfolder/oldpage.html http://www.domain.com/new.html


Other 301 Redirect Uses

Redirect Old domain to New domain

Add the following after the last used line in your .htaccess file.

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Please REPLACE www.newdomain.com in the above code with your actual domain name.

In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.

Redirect Old domain to New domain

This ensures that you donīt lose pagerank through links pointing to http://domain.com instead of http://www.domain.com

Add the following after the last used line in your .htaccess file.

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

Please REPLACE domain.com and www.newdomain.com with your actual domain name.


 
 

Affiliates

Tutorial Start Photoshop Tutorials
Tutorial Man Wallpaper Stock  More

Resources