Printer Friendly Version
Email this thread to a friend
|
Featured Web Site Template |
|
| Member |
Message |
bhenninger
Joined: Jun 24, 2004
# Posts: 6
|
Posted: 05/11/2005 06:50 pm
I have someone I'm doing a site for and they own both the .com and .net domains. They want them to go to the same site. I don't think setting DNS for both to point to the same IP address seems like the right way to go. Seems like it would come off looking like a duplicate site to search engines. Seems like I should just redirect the traffic to the .com version like I see most sites do but redirects are usually frowned upon if done a certain way.
It's a site on a Linux server and I have the domains all transferred to Network solutions now. What would be the best method to set this up so both addresses just allow you to browse the .com site?
Bob
|
 |
g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10178
|
Posted: 05/12/2005 05:09 am
This question, and variants of it, has been asked about 15 times so far this month...
Set up a 301 redirect so that domain.net and www.domain.net and domain.com all redirect to www.domain.com. It must be a 301 redirect.
Example code is provided in many previous posts this and last week.
|
 |
bhenninger
Joined: Jun 24, 2004
# Posts: 6
|
Posted: 05/12/2005 07:41 am
I apologize for the redundancy. I hate it when others do it and then I went and did it. I did a search but apparently not for the right terms. I will be more thorough in the future.
Thank you for your time.
bob
|
 |
g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10178
|
Posted: 05/12/2005 11:31 am
Check out any thread that asks about www and non-www or having multiple domains or mentions 301 redirects. There is quite a lot of stuff to read. Post again if there is anything you don't understand.
This seems to be the most-asked topic for the last few months. I'm not sure why everyone is asking for this information right now; especially after the topic has been largely ignored for the last decade, or more.
|
 |
bhenninger
Joined: Jun 24, 2004
# Posts: 6
|
Posted: 05/17/2005 08:23 am
There is one thing I don't understand. All of the posts I've read everyone seems to already have the domain names setup. Regarding the DNS, I have the .net and .com registered at Network Solutions. My hosting provider is telling me I have to setup a parked domain for the .net account so I can just go to NS and point the DNS to my host's name servers. A parked domain costs $5/mo and the guy I'm doing this for doesn't want to pay any extra but still wants to setup the .net address anyway to point to the .com site. Is there another way to accomplish the same objective? A CNAME record perhaps? I'm new to this whole DNS thing so I apologize for asking simple questions.
I've already setup the .htaccess file as instructed it's just getting the address to point to the right place so the .htaccess file can do its thing is my issue so I'm not sure if I'm even asking the right questions.
Thank you for your time and patience.
Bob
|
 |
g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10178
|
Posted: 05/17/2005 11:30 am
If you serve the same content at several different URLs (even though there may actually only be one physical web server being used) then it will hit your rankings. Some pages will get attached to one domain, and other pages to another domain.
Fix this by using a 301 redirect. This goes in the root folder of your webspace, in the .htaccess file. Anyone who arrives asking for domainA or domainB or domain... is redirected to domainZ (which is actually on the same physical hard drive space of the server as all the other domains you own) -- when the visitor comes right back but now asking for the content at domainZ the server just serves it.
The URL in their browser alters to show that they are now on the new domain, rather than the one they originally requested.
[ Message was edited by: g1smd 05/18/2005 01:35 pm ]
|
 |
bhenninger
Joined: Jun 24, 2004
# Posts: 6
|
Posted: 05/17/2005 06:31 pm
Sorry for the confusion. I understand how the 301 works. But for the 301 instructions to work, the visitor has to arrive at the correct site by going through the necessary nameserver to allow the IP to be resolved, correct? My question is this:
If my required destination is domainA, for instance, and it is sitting on a server which uses, let's say ns.nameserver.com to resolve the domain to an IP address. I also have domainB which doesn't exist anywhere yet (no server, no nameserver to resolve it, etc.), how do I get it to point to the correct server? Do I have to go to my host and park a domain so that domainB is listed in their name server? Since it is registered at Network Solutions, can I just do something there without involving the host of domainA so when the visitor does type in domainB it will be able to make it to the server? As I said, I do have the .htaccess file already setup with the proper instructions, so the 301 isn't the issue I'm having.
As always, I appreciate your help and patience.
Bob
|
 |
lizardz
Joined: Nov 12, 2004
# Posts: 1394
|
Posted: 05/17/2005 10:12 pm
" Do I have to go to my host and park a domain so that domainB is listed in their name server?"
Yes, that works fine. Or you can just point your domain name at your site a ip address. If you use the simplest form of 301 rewrite, ^www.domain.com -> www.domain.com anything that is not www.domain.com will be directed to www.domain.com
|
 |
bhenninger
Joined: Jun 24, 2004
# Posts: 6
|
Posted: 05/18/2005 05:34 am
That's what I wanted to hear. As I said, I'm new to this DNS and I wasn't sure what my options were. So I can point directly the IP address of my server. The only drawback would be if it were to change servers and, therefore, my IP address as well. Since it would only be the .net pointing there and the .net is only there if someone typed in the address incorrectly, that won't matter much.
Thanks for the help. If someone sees a drawback to that setup, let me know.
bob
|
 |
g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10178
|
Posted: 05/18/2005 01:39 pm
As long as the URL shown in the address bar of the browser changes to show domainZ wherever you start from, then the redirect is working.
You will need to redirect both non-www and www for all domains in order to cover all bases.
|
 |
Prowler
Moderator
Joined: Aug 14, 2000
# Posts: 1705
|
Posted: 05/19/2005 12:05 am
g1smd has covered everything on this topic.
>>As long as the URL shown in the address bar of the browser changes to show domainZ wherever you start from, then the redirect is working.
The browser address bar change is not a reliable method of checking what kind of redirect has been implemented. You can check the header information sent in by the server - if you use Firefox and the extension Response Header Viewer.
|
 |
g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10178
|
Posted: 05/20/2005 01:45 pm
Yes, you're right.
Seeing the URL change simply shows that there is some sort of redirect in place. It doesn't check that the redirect is actually the right type.
Use an online header checker, or download WebBug and check that the response really is "301". A "302" code will be fatal to your site.
|
 |
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you cannot find this message, click here to Re-Send it.
|
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.
|
Switch to Advanced Editor and ...
Create a New Topic
or Reply to this Thread
|
|