Friday, 15 November 2019

301 redirection from domain to domain in Htaccess

301 redirection:

A 301 redirect is a permanent redirect from one domain url to another url. 301 redirects website visitors and search engines to a different url than the one they originally typed into their browser or selected from a search engine results page.


Step 1: On Rewrite Engine using the below code

RewriteEngine on



Step 2: Create a rewrite url for redirection. Refer the below code

RewriteRule ^(.*)$ https://www.websiteurl.com/$1 [R=301,L]

Kindly check the complete code for 301 redirection.

RewriteEngine on
RewriteRule ^(.*)$ https://www.websiteurl.com/$1 [R=301,L]

No comments:

Post a Comment