Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a website with dns pointing to my own server. the website WITH www.mysite.com lead to the right site, but the address mysite.com lead to a publicity site that I DONT CONTROL

I like to make www.mysite.com and the mysite.com lead to the same DNS

Can i make it with .htaccess or with google analitic, but since i dont know the resolver that lead me to the bizzare page i dont have control on that

As request : http://www.demolition-st-chrysostome.org/ (ok) http://demolition-st-chrysostome.org/ (no)

share|improve this question

migrated from stackoverflow.com Feb 5 '10 at 11:09

This question came from our site for professional and enthusiast programmers.

    
waht's the site url. Maybe we can help you. –  Christopher Mahan Feb 5 '10 at 9:19
    
How exactly do you have control over the subdomain if you don't have control of the domani itself? –  Jon Cage Feb 5 '10 at 9:20
    
What do you mean "do not control"? It jumps to a third party somedomain.com, or displays mysite.com? Who manages the DNS settings? If you have access, could you list them? –  ron Feb 5 '10 at 9:22
    
Points to the same site for me, works now? –  artifex Feb 5 '10 at 14:30

2 Answers 2

All you need to do is to add an A record for 'mysite.com' in your nameserver that points to the public IP address of your web server. You have to do this from the same place where you've set the IP address for the www subdomain.

If 'mysite.com' is pointing somewhere out of your control, there is no way you can do anything useful with .htaccess, before you add/change the A record in the nameserver.


UPDATE:

Further to your edit, it looks like your DNS records are fine, and both are working. If you have recently modified your nameservers, they may take a few hours to work correctly because of DNS caching.

share|improve this answer
3  
and have the www cname point to the A record. –  Christopher Mahan Feb 5 '10 at 9:22
    
@Christopher Mahan: why should we use CNAME in this case? –  Parsa Feb 5 '10 at 12:39

If mysite.com is under your control, you should put both mysite.com and www.mysite.com in DNS pointing to your server.

It might be that a provider set this up for you and they forgot to put both entries in DNS? In that case you should get in contact with them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.