Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm very new at this so apologies if this is too easy, but would this be proper syntax for redirecting an entire site to a new domain? This is what was suggested so my other concern is blank lines, spaces, etc. Thanks

RewriteEngine On

# Redirect Entire Site to New Domain
RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]
share|improve this question

1 Answer 1

Yes that's correct and would 301 redirect everything on to the same path on Plenty of similar questions on the StackExchange network such as this one.

share|improve this answer
Thanks Geoff. @krokola directed me to that question but I just wanted to be absolutely certain. – lstewart Feb 23 '14 at 17:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.