Question Asked: How Do I Redirect All My Webpages To My New Domain Name?
|
Jun 29th, 2009 |
Changing your domain name can be a pain in the butt, especially if you have a lot of webpages with links in them.
The easiest thing to do is to use a “Redirect” rule, that is unless you prefer opening all of your pages and updating links by hand. And of course, you can’t redirect traffic coming from search engines that way. So we’ll proceed with a redirect.
If you already have an .htaccess file in your website’s top directory (ie; not in a folder), open it. If you don’t, open NotePad or an equivilent text editor. Do not use WordPad.
Type the following in the document:
RedirectMatch 301 (.*) http://www.your-domain.com/$1
Replace “your-domain.com”, with what your new domain name is. Leave the $1 on the end.
Now save the document, and re-upload it to your server for your old domain name. (If you didn’t have an .htaccess file. Save the file as htaccess.txt. Upload it, then rename it to .htaccess once on your server.)
Now any request for any page on your old domain will redirect to the domain name you’ve specified. So mysite.com/this-webpage.html will redirect to mynewsite.com/this-webpage.html
Other answers you may find useful:
- How Do I Stop People From Linking To My Images On My Website?
- How Do I Move My WordPress Blog To A New Domain?
- Where Should I Buy My Domain Name?
- How Do I Register A Domain Name?
- How Do I Change My Google Apps E-mail URL?
Previous Post |
Next Post |
| « Did Jenna Fischer Actually Walk Across The Coals On The Outing Episode Of “The Office?” | When Does Harry Potter and the Half Blood Prince Open In Theaters? » |
Comment On This Post
