301 Htaccess redirection

301-redirect
301-redirect
301-redirect
301-redirect

301 redirection is a permanent redirection and is used for moving visitors and search engine spiders from one webpage to another.  301 Redirection is sufficient condition for search engines to know that old page has been migrated to another page and old page is dead. After successful 301 redirection you will find your old page has been deindexed from search engines and your new page will appear in all search engines without losing any link juice and visitors.

Redirect whole website/blog

If you want to redirect whole blog or website to a new address you may use below code:

RewriteEngine on

RewriteRule ^(.*)$ http://yournewadress.com/blog/$1 [R=301,L]

HTAccess 301 redirect for www to without www

RewriteEngine on
RewriteCond %{http_host} ^www\.ktechie\.com [NC]
RewriteRule ^(.*)$ http://ktechie.com/$1 [R=301,NC]

ktechie301-redirectcode
ktechie301-redirectcode

Replace XYZ.com with your domain name.

How to Redirect a single page.

You may redirect a single page using 301 redirection.

Redirect 301 Old-URL New-URL

Example:

Redirect 301 http://xyz.com/url1 http://xyz.com/url2

Here in this example your website url 1 will be redirected to url 2.

With the help of these 301 redirects you can easily redirect visitors and search engines to new web address without any losses.

Be the first to comment

Leave a Reply

Your email address will not be published.


*