Mobile app version of vmapp.org
Login or Join
Connie744

: How to point two domains to one ip address with a sub-domain I am a little stuck here I currently have a domain: www.my-site.org & m.my-site.org I want to point m.mainsite.org to m.my-site.org

@Connie744

Posted in: #Dns #Htaccess #Redirects

I am a little stuck here I currently have a domain:
my-site.org & m.my-site.org

I want to point m.mainsite.org to m.my-site.org

I already have an A record created for m.mainsite.org I need to know what I have to do to the server that my-site.org is on.

I have this site on a unix apache server. Any help would do.

Thanks!

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Connie744

1 Comments

Sorted by latest first Latest Oldest Best

 

@Correia994

What you probably want is called a "CNAME" Record. This is like a softlink to a domain.

You would add it wherever your DNS provider has the "A record" you mention, and it would look something like

m.mainsite.org. CNAME m.my-site.org.


This tells the DNS resolver that whenever it sees m.mainsite.org, it should go try and resolve m.my-site.org

Note the trailing dots -- some DNS providers require them, some do not. When in doubt, use them.

Note that this doubles the initial lookup time for someone visiting your site; they have to do two lookups now.

A faster way that requires more maintenance is to just add an A record for m.mainsite.org that points to the IP address at my-site.org. If you do that, you will need to update both in case of a new IP address, or a failover scenario.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme