Let's say I have domain.com and it is hosted on wordpress. I buy a new domain, move over the site to the new domain and keep the file structure intact. Domain1.com/word/topic-title Domain2.com/word/topic-title How can I easily do a 301 redirect of domain 1 to domain 2?
Like so redirect 301 /old/old.html http://www.newdomain.com/new/new.html Code (markup): Don't, whatever you do, decide to be a lazy sod and just redirect the domain only otherwise you will need to wait for all of the pages to be reindexed from scratch. Do a 301 redirect for each and every page. Further reading: http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm http://www.isitebuild.com/301-redirect.htm Edited to add: If the file structure is identical you can redirect using htaccess with a single line like so: RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] Code (markup):
What mcfox said is spot on and will take care of the trailing part of the url after the main domain. If you're not comfortable with doing htaccess stuff yourself and this is a self-hosted wordpress issue, check out these two plugins as well. they can help if you dont have a lot of links, even if you have a lot of links, it allows for regex arguments so you can canvas a lot of pages at once provided they have similar or identical structures. 1 - Redirection http://wordpress.org/extend/plugins/redirection/ 2 - Page links to http://wordpress.org/extend/plugins/page-links-to/ And there are several other plugins that do similar stuff. Of course, htaccess will be faster and more efficient than the plugin but these are just other options.