Answer the question
In order to leave comments, you need to log in
Am I doing the right 301 redirect?
Tell me if I did the redirect correctly?
I want any request to the old site to be sent to the new one.
and here HTTP_HOST is also indicated in the text - is this normal if my site is on https?
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} robots.txt$ [NC]
RewriteRule ^([^/]+) $1 [L]
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ newdomain.com /$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.domain\.com
RewriteRule ^(.*)$ www.newdomain.com/$1 [R=301,L]
and
User- agent: Yandex
Host: newdomain.com
User-agent: *
Disallow:
Sitemap:newdomain.com/sitemap.xml
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question