Delete Subdomains 301 Redirect

Why Use Permanently Moved Redirect

Changing a website's structure isn't as easy as it sounds. For money making websites that depend on organic search engine traffic, it can be very risky.

The problem lies in how the search engines rank webpages and calculate their search result ranking and authority. Google uses the term PageRank for how much authority a webpage has. This PageRank is accumulated over time by numerous factors. One of the big factors in earning more PageRank is incoming links.

The more incoming links a page has, and the higher the authority of the pages building those links, the higher the PageRank of the resulting page. The problem is that when you move that webpage, all of those high quality links you build up keep pointing to the old page, and the new page starts with zero links and no PageRank.

301 Redirects Search Engines

301 Redirect Keeps PageRank Intact

The key to avoiding the problem of losing PageRank when a webpage or website is moved is to use what is called a 301 Redirect. Basically, a 301 Redirect tells everyone (including Search Engines and their Spiders) that the page they are looking for has been moved permanently. Usually, the best way to handle a permanent redirect is with the .htaccess file, which is why you should never use a webhost that does not allow access to the .htaccess file, like Yahoo Small Business hosting.

This happens all the time when you click on links, but it happens behind the scenes in your browser, so you never see it.

When a search engine encounters a webpage that is properly marked with a 301 Redirect, then it not only follows that redirection to the new location, it also updates its index and transfers (most) of the PageRank to the new page. After all, the new location is the new permanent home.

Redirecting SubDomain to Non-SubDomain

There are TONS of resources out there to show you how to do 301 redirects, complete with sample code that is easy to copy and paste, so that you just have to insert your domain name. This is true whether you want to redirect a whole domain to a new domain, or if you want to redirect an old webpage to a new page location, and so on.

What seems to be missing is reliable information on how to turn off a subdomain.

For example, if you wanted to change your blog from blog.besthubris.com to www.besthubris.com/blog/ how would you go about that. (Or to besthubris.com/blog/).

The tricky part is, that not only do you have to get the .htaccess code right, you also have to put it in the right place.

The code to redirect a subdomain to a non-subdomain is fairly straightforward, for .htaccess files, at least:

This will redirect any attempts to access blog.financegourmet.com to www.financegourmet.com/blog/

It seems like the best way to handle this is to delete the subdomain from your web hosting account and put the redirect in your root directory. Unfortunately, while that will eventually work out, it can cause some issues in the meantime. Deleting the subdomain causes the DNS record to respond initially with a bad_http message. This tells the other DNS servers to eliminate the name records that used to point to the subdomain. If the Google spiders come along during this time, the name will not resolve and your PageRank and links and so on will start to evaporate.

After some time, the old subdomain will stop resolving at all, and your root domain name records will finally take over and things will start to normalize, however it can take a while and that lost index position may take a very long time to come back.

What is worse, is that the cached records in the search engine indexes will slowly expire, sometimes over the course of months.

On the other hand, if you put the permanent 301 redirect in the .htaccess file in the root of the subdomain then none of these problems will occur. Instead, as the spiders come by, they will not only instantly find the new home, they will also expire the old cached records right away, leaving no "orphans" in the index.

After a sufficient period of time, four to six weeks, every index out there should be updated, and THEN you can move the redirect to the root domain (you'll want to keep it forever because you never know how many links are still out there pointing to the old location).

Remove your subdomain with a permanent redirect 301 this way, and you can save your PageRank, keep your visitors, and make your life a lot easier.