Are you a Google Analytics enthusiast?
More SEO Content
301 Or Dns Redirect
Posted 11 November 2004 - 05:57 AM
I've noticed this topic has been very popular lately.
I am looking for your remarks on my situation and the way I handled it.
My client has two different main sites for our company: www.MyDomain1.com and www.MyDomain2.com
Mydomain1.com has Google PR=1
Mydomain2.com has Google PR=5.
For technical issues we have decided to update Mydomain1 and redirect Mydomain2.com to 1 .
inorder to redirect I've added the following header to MyDomain2.com/index.asp :
Redirect 301 * h ttp://www.MyDomain1.com
is this enough to redirect any hit or inbound link to our new update MyDomain1.com?
Will this redirwect users from all MyDomain2.com Pages or only from index.asp?
Was I better off updating MyDomain2 current DNS to Mydomain1.com IP Address?
I have obviously two main goals:
1. Make sure the users who visit MyDomain2.com will see the contents (and will be redirected) to the updated MyDomain1.com.
2. To preserve Google PR for MYDomain2.com and have it updated to MyDomain1.com's PR.
Posted 11 November 2004 - 06:12 AM
If so, only visits to that particular page are going to be redirected. Visits to any other page of the site will not redirect.
If you want to redirect all traffic to any page on the entire domain you'll have to do it at the server level, or place redirect code in each page that currently exists.
The pinned thread above has the ways to do that for both *nix servers (.htaccess) and Windows servers.
Posted 11 November 2004 - 06:53 AM
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.domain.com/"
as in the pinned thread at the top of the forum.
the code you posted is for the .htaccess (Apache only)
if you want to redirect every page in one domain to the same pagename in another domain use this. This also makes www the default.
MainDomain = "www.mydomain.com"
hostname = request.servervariables("HTTP_HOST")
pathinfo = request.servervariables("PATH_INFO")
if pathinfo <> "" then
if instr(lcase(pathinfo),"default.asp") > 0 or instr(lcase(pathinfo),"index.asp") > 0 then
MainDomain = MainDomain & "/" & mid(pathinfo,2,instrrev(pathinfo,"/")-1)
MainDomain = MainDomain & pathinfo
MainDomain = MainDomain & "/"
if left(hostname,instr(hostname,".")) <> "www." then bRedirect = true
if instr(hostname, "domain2") > 0 then bRedirect = true
if bRedirect then
response.status = "301 Moved Permanently"
response.addheader "Location", "http://" & MainDomain
I normally put the code into an included file with every page.
It will work for redirecting subdomains and parked or aliased hostnames and also makes sure that the index page will not appear in the URL for subfolders.
Posted 11 November 2004 - 11:08 AM
I was just wondering.
Our programmer suggested to make the change on our IIS settings.
So every link which directs to www.Mydomain2.com will redirect to MyDomain1.com .
We want every attempt to reach any page on MyDomain2 to redirect to MyDomain1.com/Default.asp
Randy, is this what you ment by taking care of the redirect in the server level?
Does the IIS redirect method preserves Google PR and other SEO specific concerns?
Posted 11 November 2004 - 12:36 PM
You will need two sites pointing to the same folders. One with a hostheader for the primary hostname (www.domain.com) the the second site with hostheaders for domain.com, www.domain2.com and domain2.com. plus any other DNS alias/pointers you have set up.
Then because there are SE indexed pages, you need to set permanent redirects for every individual document in the site not just at the top level, otherwise all access to other pages in the other domains will be directed to the site root and rankings/PR etc for those pages that are indexed will be lost.
This cannot be done with one virtual host and hostheaders.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users