301 Redirect vs. Base Href Face Off
I recently asked a question over at IHelpYou Forums about whether or not a 301 redirect could be replaced by a base href tag when used on a series of parked domains. This turns out to be a rather interesting issue and since the thread kind of went in a number of different directions, I though I would try and consolidate the information here for myself and for you.
The Set Up:
Mr. Webmaster has a ton of very good domain names. Most are good single words which get a large amount of type in traffic. The goal here is to get these domains all pointing to the same target while preserving their and the targets search integrity. While most believe that the 301 is the standard solution in this case, there is a contingent of people who believe that the base href can accomplish the very same task.
To be clear, let’s define “search integrity†as it applies across these domains. First, only one domain can have any pages indexed. Engines do not want redirected domains in their indexes and are not very nice when they find them. Additionally, all domains need to remain penalty free. These are valuable domains and penalties would reduce their resale value. Seems simple doesn’t it … :)
Ok, now let’s meet the players …
Player One, Base Href:
The Base element was introduced with the HTML3.2 specification on Jan 14 1997. Not used as often as many other HTML elements, those who have embraced it have done so feverishly. The W3C HTML 3.2 Reference Specification defines the Base Element as giving “the base URL for dereferencing relative URLs, using the rules given by the URL specificationâ€. Here’s an example of what they are talking about. In this example page we have a base element in the header and an image linked using a relative link …[html]
![]()
[/html]
The Base element will dereference the relative URL and create a fully formatted complete URL to retrieve the image as follows…[html]
[/html]
This is the intended function of the Base Element, however we will see in a bit that some interesting things can happen when the Base Element href points to a different domain than the one the current page is sitting on.
Player Two, 301 Re-direct:
The 301 Redirect is actually a Header Status Code implemented with the Hypertext Transfer Protocol — HTTP1.1 Specification released in Jun of 1999. The status of the HTTP 1.1 response code is “Moved Permanentlyâ€. This tells the requesting agent that the page it is requesting is no longer there and points it to a new location. Here is the W3c’s description of how it works.
The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible. This response is cacheable unless indicated otherwise.
There are a number of ways to implement a 301 Re-direct using both on page code and server side scripting. On the server side the most common method of 301 Re-direct is by creating a Mod-Rewrite in the the Apache based [.htaccess file]. Here is an example of a 301 redirect to control URL canonicalization:[code] # Turn on rewrite
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L][/code]
Notice the “R=301″ in the code above. This tells the Mod-Rewrite to use the 301 status code when doing the re-write. You can also do Mod-Rewrite on windows based servers using ISAPI. It’s a bit more complicated but very doable.
The 301 can also be done using on page code in a variety of languages. The primary difference here is that when the re-direct is done in the page’s code, the page must be served from its current location before the new page is requested. Using a server side request, the page requested initially does not even have to exist. Here are a couple of samples of how the 301 would look to fix the same canonicalization issues done in a couple of common languages.[php]
if(!stristr($_SERVER["HTTP_HOST"], 'www')){
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.domain.com/" . $_SERVER["REQUEST_URI"]);
exit();
}
?>[/php][asp]<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.domain.com/"
%>[/asp]
Applying the Problem:
The main issues to consider when we want to determine how these two techniques maintain “search integrity” is how the search engine spiders react to and handle the requests and what happens to the pages in the index.
It has long been known that when using a 301 re-direct, search engines will only index the final URL and if the initial page has a indexing history, the page’s history will transfer to the new URL. This usually includes references from inbound links and Page Rank. Additionally, the major search engines have noted this is an acceptable technique to change URLs and do not penalize URLs using it.
In the current scenario, the parked domains will return a 301 response and transfer the user to the indicated URL using either the server script or page code methods. The 301 Re-direct will maintain “search integrity” as it is defined for this discussion.
The question now becomes “Can the Base Href do the same?” Here’s where the issue becomes cloudy. Base Href is designed to work with in a single domain. What happens when you set the Href to a domain other than to one you are on? g1smd, a member of a number of SEO forums and a participant in the discussion that prompted this article did some specific Base Href testing on this and posted his results over at the Web Master World Forums. his study showed that only using the Base Href he was able to get pages located on domain #1 indexed on domain #2 by only putting the external pointing Base href on the pages located on Domain #1. The pages never existed on domain #2 but eventually all showed in the index as belonging on Domain #2. Very interesting information indeed.
However, this test does not encompass the situation as defined in this discussion. What we have here is a number of domains with no pages which need to be pointed to a domain with pages. Pretty much the exact opposite of g1smd’s test. Let look at our criteria to meet “Search Integrity”.
Will only the final domain be indexed in the engines? Using the Base Href the pages will return a response code in the 200 range, I have seen both 200 OK and 206 Partial Content returned on pages using the Base Href. None of these responses would prevent the page from being indexed. Additionally, will the domains remain penalty free? Since the domains are serving content with no re-direct, it would depend specifically on what that content was and how it was served. The Base Href itself is not shield against a penalty at all.
Again, in the current scenario, the parked domains are indexable using only the Base Href method. Additionally, this method offers no protection to the domains from search penalties. The Base Href will not maintain “search integrity” as it is defined for this discussion.
The Conclusion:
I think it is fairly clear that the 301 Re-direct is the only way to go in this situation. While the Base Href is very useful, it does not provide the functionality or protection that would be required here to keep these domains safe and indexed properly.
- Article Permalink
- http://www.appliedseo.com/archives/301-redirect-vs-base-href-face-off/
- Article Trackback Link
- http://www.appliedseo.com/archives/301-redirect-vs-base-href-face-off/trackback/


