Custom Search

Changing Domain Names: How to Use a 301 Redirect to Forward PageRank & Traffic To New Blog or Website

About 1 month ago, I did the unthinkable: I took a successful website I had developed (heathives.com), and I completely re-branded it to a new domain  name (cholinergicurticaria.net). The website is about a medical condition I have known as Cholinergic Urticaria. The reasons I wanted to re-brand the site can be summarized below:

  1. I wanted the name to reflect the actual disorder. This just looked more professional than “heat hives.” This was important since I wanted this to be the number 1 site about this condition on the entire web.
  2. I theorized that if the domain name matched my actual keywords for the site (Cholinergic Urticaria), I would see a bump in SEO benefits. I was right–Heathives showed up at number 10 on Google results before, and when I made the change to the new domain, I quickly shot up to position 6 (and today I am at 4). So it definitely seems I was right and this strategy paid off.

So I researched to how completely change your Wordpress blog (and forum software) to a new domain name. It actually wasn’t difficult (I will post on this soon too). The whole process took about a day.

To do this, you will need to create a list of all of your old URLs and all new URLs so that you can use the redirect code (below) to redirect all old URLs to the new ones. So if you have hundreds or thousands of pages, you will need hundreds or thousands of redirects. You then add this list of redirect codes to your .hta access file on your server (for the old domain). This will also transfer PageRank (although it will take a few weeks/months for that). The redirect code you will need to use for each individual URL is below (1 URL example):

redirect 301 /your-old-url/ http://www.new-domain.com/your-old-url/

As you can see, the first part of the URL just contains the redirect code (redirect 301) which means it is a permanent redirect. Next, you have the extension of the old domain’s file. So if it was:  http://www.heathives.com/your-old-url/, the first part of the code would be /your-old-url/.

The next part contains the full URL for the redirect. This URL should contain the new domain name (and the file extension will be the same unless you rename the file).

But anyway, here is how I setup a 301 Redirect to a new domain easily with an entire list of redirects:

How to Setup a 301 Redirects for Each URL When Changing a Blog or Website’s Domain Name

First, always use common sense and make backups of everything before you change anything just in case something goes wrong. Better safe than sorry! Now you can get to creating your 301 redirect list.

1. Copy All URL’s Before Changing–You need to make a list of all of your URLs before making the move and creating your 301 redirect. For mine, I copied this list into notepad. This is easy if you have a Wordpress sitemap.xml plugin. I just went and copied all of the URLs from my sitemap.xml file. If you don’t have this, you need some way to get the complete list of all of your URL’s. You only need the URL at this point, and nothing else (if your sitemap has other data). Don’t forget to include EVERY page you want redirected. The list looked something like this in my blank notepad file (2 URL example out of  hundreds):

NOTEPAD FILE #1

http://www.heathives.com/example/

http://www.heathives.com/forum/

2. Make A Second Copy of the Old URL’s–I then opened another notepad file, and I copied & pasted all of the old URL’s from the first list (NOTEPAD FILE #1) into it the new notepad file (NOTEPAD FILE #2). So at this point I have 2 notepad files with an identical list of the old domain’s URL (all in the same order, same spacing–that is important).

3. Use Find and Replace on the Second List–On the NOTEPAD FILE #2 list I created in the step above, I used the “find and replace” feature (under the edit menu on notepad), and I replaced all of the “heathives.com” occurrences with “cholinergicurticaria.net.” This was super easy and worked instantly. Thus, I now had 2 lists in 2 different notepad windows: One with the old URL’s, and one with the new URL’s (the domain was all that needed updating).

So NOTEPAD FILE #1 still looked like the list in number 1, and the NOTEPAD FILE #2 was changed (by using find and replace) to reflect the new domain URLs, and it looked like this:

http://www.cholinergicurticaria.net/example/

http://www.cholinergicurticaria.net/forum/

4. Edit NOTEPAD FILE #1 to Match the Beginning Redirect Code–At this point in time, we need to change the old URLs to match the beginning of the redirect code. Thankfully, we can use find and replace again. So I went to NOTEPAD FILE #1, which looked like this:

http://www.heathives.com/example/

http://www.heathives.com/forum/

and I used search/find and replace to edit the file again. For the “find”  part, I entered: http://www.heathives.com  and for the “replace” section I entered: redirect 301  (with a space after the 301). This made the NOTEPAD FILE #1 look like this:

redirect 301 /example/
redirect 301 /forum/

5. Copy Each List into a Column in Excel or Calc–At this point we are getting close to having our completed file for the 301 redirect. We still need to connect what is in NOTEPAD File 1 to what is in NOTEPAD file 2 on one line so we can have the completed redirect code for each individual URL. We need this for EVERY URL we have in order for it to work right!

So how I did this was I copied all of the contents in NOTEPAD 1 into column A of a spreadsheet. I then copied the contents of NOTEPAD #2 into column B. Make sure each one lines up perfectly as the example shows below:

Column A:                                              Column B:

redirect 301 /example/              http://www.cholinergicurticaria.net/example/

After each notepad file was posted in the appropriate column, I then merged each row (merging column A & B only), so that it all came together like this:

redirect 301 /example/ http://www.cholinergicurticaria.net/example/

Next, I recopied all of the finished code into notepad, and made sure it looked great. Make sure the code has the appropriate spaces, and only one redirect is present per line (although if you have long URLs it may take up two lines for each code). The finished product should look like this in notepad (only 2 URL’s used as an example):

redirect 301 /example/ http://www.cholinergicurticaria.net/example/
redirect 301 /forum/ http://www.cholinergicurticaria.net/forum/

So make sure each line has appropriate format, single spaced, one space after the old URL and new.

Uploading the 301 Redirect Code to Your Blog or Website’s .HTA File

You then need to edit the .hta file on your server. IMPORTANT: The 301 redirects need to go on the OLD domain .hta file (not the new one).  This should be in the root directory of your old domain’s files. It just says .hta. In Godaddy.com, this is easy to edit. Just select the file, and hit the edit button. This will then open the file.

I then copied and pasted all of the finished URL redirect codes from my notepad file into the .hta file. There were several hundred URLs, so it was quite long. I then saved the .hta file.

Next, I checked to make sure it was properly redirecting to the new site. Just enter the old URL into a browser, and it should immediately redirect you to the same file on the new domain  name. It worked like a charm.

Also, you need to keep the old domain and the .hta access file intact for as long as you want to redirect (which is potentially forever). So make sure to renew the old domain so you can get all of the old referring traffic (from old links/bookmarks) and so it will redirect properly to your new domain.

Final Thoughts and Tips:

This worked great for me, and only took about an hour or so. It is far easier than doing each URL manually. Here are a few other comments about this experience:

  • It took the search engines about 2-5 days to update the search results to the new URLs. So keep that in mind.
  • I did not see any drop in traffic at all. So that was worth the effort alone, and I highly recommend you do this for you visitors and good webmaster practices.
  • This only works on Apache servers (or servers configured to recognize the redirect code)
  • Your server must have rewrites available. It should automatically be set up for this if you are using Wordrpess.
  • PageRank WILL update to the new domain & pages if you do this right. However, it does take a bit longer (usually a few weeks-3 months)
  • Google Webmaster tools also has a neat feature where you can do a “Change of Address.” I also did this to help speed the process.
  • I did see an SEO benefit by having my main target keyword in my domain. This took place within a week or two (before the actual PageRank Updated)
  • You  need to update any links outside of your site (I will cover that in a future post). Also, you need to do it within your site.
  • There may be an easier way to update all URLs and create a redirect other than what I have posted above. If there is, I couldn’t find it. I invented this method of combining the URLs in notepad myself, and it was fairly quick. It would be nice if one line of code could do this without having to list individual URLs. But to my knowledge, it doesn’t work. If you know an easier way of doing this without having to create individual redirects for every page, write a post about it and ping this article. I will be happy to add a link if you can do it better.
  • This took place in early 2010. So if you are reading this article in 2075, this page will be probably completely irrelevant and outdated. But I suppose this will work for at least the next 5-10 years, maybe longer (or maybe not).

I hoped that helps anyone changing their blogs or websites to a new domain. It may take an hour or two for you to do this, but it is worth it.

Posted under Blogging Tips

This post was written by Ben on March 15, 2010

Tags: , ,

Sponsored Links

Custom Search

CNN Breaking News: Digg Get’s Makeover-Sales Pitch Pages Disguised as News

I have no clue what is going on with today’s news. It seems that top news organizations are now commonly masking sales pitches and product promotions, and re-branding them as top news stories.

Just today, on CNN’s  home page, they have a story here about Digg.com’s “new wicked fast website makeover.” Gnarly man. Tubular! Excellent-eh.  Funny how my “wicked cool” website re-designs never made the top news. Maybe I did something wrong?? Hmm.

What is going to be breaking news next? Perhaps an eBook that tells you how to be rich overnight? Or maybe you can “lose weight by following 1 simple rule.” Gimme a break.

Anyway, this is just one of the many articles floating around on major news station’s websites. I have absolutely nothing against news stations reporting on products. But I do expect 2 things when they do so:

  1. A level of unbiased integrity. They should report facts, not promote products.
  2. A website re-design has no place as a top news story on page one.  Period.

I can remember that during the election, they reported on EVERYTHING Obama. It was literally “breaking news” if Obama was speaking, writing, or living in the eyes of CNN. I was just waiting for them to report: “Breaking News, Obama farted.” That is how absurd it was.

I personally have switched to Fox news for my news coverage. I used to only check CNN and AOL for my news. However, I kept hearing a lot of talk about Fox News (saying they were fair, others saying they were conservative). So I checked them out.

I must say, I was absolutely stunned at the difference. For example, CNN almost NEVER produces stories against democrats, or Obama, or anti-global warming. When the controversy came out about the scientists skewing data (after they found out from his emails), CNN was nearly silent on the issue. Fox covers it all (the good and the bad).  That is how a news station should work. They should report on ALL relevant content (regardless of political or religious opinion).

After reading Fox News, it is clear that they are far more unbiased than CNN. I am sure Fox isn’t perfect, but they are FAR better than CNN by a country mile.

Posted under News

This post was written by Ben on March 15, 2010

Tags: , , ,

Sponsored Links

Page 2 of 14112345...Last »