One of the most asked questions I get is How do I 1 to 1 (post to post) redirect wordpress to my new domain?
Occasionally you need to move from one url (domain) to another and you don’t want to lose all the traffic that you’ve worked to get on the old domain.
After you’ve done the grunt work of copying files, folders and database (s) you need to do a good old fashioned 301redirect so that when folks visit http://yourolddomain.com/link they land on http://yournewdomain.com/samelink.
1. Go to your .htaccess file in your cpanel of your OLD domain (this is a hidden file so be sure you have the show hidden files box checked in the file manager)
2. Then use the CODE EDITOR to add the following at the very beginning of the file. If you’re not using www on your domain names, be sure you drop that from the items as needed.
[pastacode lang=”markup” message=”” highlight=”” provider=”manual”]
# BEGIN WordPress
RewriteEngine On RewriteCond %{HTTP_HOST} ^www.oldsite.com
RewriteRule (.*) http://www.newsite.com/$1 [R=301,L]
# END WordPress
[/pastacode]
3. Remove any other lines that may be present in your .htaccess for the old site.
4. Save your work.
Does working inside your WordPress installation ‘freak’ you out? Totally afraid you’ll blow your site out of the water? Fear Not! We can help, just visit our Project Inquiry and we’ll get you taken care of in a blink of the eye. Generally I advise bloggers against making changes to their .htaccess file unless they’re very experienced. This is a simple change that most can do. However, if the thought of changing anything in your htaccess makes you queasy, feel free to use our project request form and we’ll get in touch as soon as possible.