Skip to content

Instantly share code, notes, and snippets.

@ajaegers
Last active August 29, 2015 14:13
Show Gist options
  • Save ajaegers/d6081a8d1845131db3b4 to your computer and use it in GitHub Desktop.
Save ajaegers/d6081a8d1845131db3b4 to your computer and use it in GitHub Desktop.
SEO: Properly remove old urls/domain from Google index
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !/robots.txt [NC]
Rewriterule ^(.*)$ http://yournewsite.com/$1 [L,R=301]
</IfModule>
User-agent: *
Disallow: /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment