Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've just finished making a website for my dad and need to get it on line. He has a domain already (and I have access to the admin panel for that on 'fasthosts') and my mum already has some server space which she rents jointly with an old colleague of hers who handles most of the administration. My questions is:

How do I change the DNS records of the domain to point to the server my mum already has? Once both domains are pointing there I have some information on how to use URL rewriting to "split them up" again. In fact I'll post that below and would appreciate any feedback on that too.

Sorry for such a basic question, but my knowledge of how domain hosting and name servers and DNS works is poor. I have tried to Google my way around this, but nothing ties up very well with the options I have in the control panel (which is perhaps intentionally confusing).

Many thanks!


That information about rewriting:

Running multiple sites from a single virtual server

If you've registered two or more domains, each running as a separate website, usually this would require each domain to run as a separate virtual server. However, URL Rewriting will allow you to run multiple sites using just a single virtual server.

For example, if you have the domains www.site1.com and www.site2.com, simply place each site in a folder under your htdocs folder with the same name as the domain, i.e. /site1 and /site2.

The code required would be set out in the following format:

<rule name="Site1">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="site1.com" />
</conditions>
<action type="Rewrite" url="/site1/{R:0}" />
</rule>

Just keep adding new rules for any new sites. If you would like 2 sites to point to the same folder, you can just add in more conditions:

<rule name="Site1">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="site1a.com" />
<add input="{HTTP_HOST}" pattern="site1b.com" />
<add input="{HTTP_HOST}" pattern="site1c.com" />
</conditions>
<action type="Rewrite" url="/site1/{R:0}" />
</rule>
share|improve this question
add comment

2 Answers 2

To change/set where a domain points to, you need to do 3 things:

  1. Add the domain to your web server, which is typically done via a web host's administration panel unless you're running your own web server.
  2. Add the domain to the nameservers you'll be using. This is also typically done via a web host's admin panel (usually handled automatically during step 1), but some peple may use separate DNS hosting services.
  3. Change the nameservers that the domain points to in the registry of your TLD. This is pretty much always done via the registrar through which you registered the domain. The nameservers referred to are the ones in step 2.

So, typically, you log into your web host's admin panel, add the domain name, and write down the nameservers the web host tells you to use (e.g. ns1.example.com and ns2.example.com). Then you log into the account you used to register the domain and enter the previously noted nameservers. After that, you just need to wait for the DNS changes to propagate.

However, if you're using a dedicated server that isn't managed by a web host or through a web hosting panel like cPanel, then steps 1 and 2 may be a little more complicated. Hopefully, your mom's colleague knows enough about basic server administration to handle stuff on that end for you, because a novice should really be using managed hosting.

share|improve this answer
    
Okay, thank you for that. I have contact the other guy on the server (who has access to the control panel) and have asked him to initiate the transfer process. Am I right in thinking that I will then just need to change the IPS tag and nameserver records in the domain registrar control panel and that's it? Will that get me to the stage where both domains point to the same website? –  Max Spencer Jan 13 '12 at 10:47
    
@Max: There is no need to change the IPS tag unless you're literally transferring the domain from one registrar to another. (And you shouldn't have to do it manually; it's just something that the registrar does when you initiate the transfer from their end.) If you want to continue using the existing registrar and just set where you want the domain itself to point to, then you only need to set the nameservers for the domain to the ones your mom's colleague administers or uses. –  Lèse majesté Jan 13 '12 at 15:13
    
Just to clarify, the server my mum and her colleague use is a piece of shared hosting (although a pretty well equipped piece as far as I understand) from a pretty big company, it's nmot a dedicated server owned by the admin guy. So I am just wondering, if I change the nameservers to ns1.thehostingcompany.co.uk etc.. How will those nameservers know where the domain should go to? –  Max Spencer Jan 13 '12 at 15:23
    
Sorry if I just sound very naive and ignorant about this... –  Max Spencer Jan 13 '12 at 15:23
    
@Max: No worries, we all need to start from somewhere. Your webhost's nameserver will know the IP the domain should resolve to because it has a zone file containing the DNS records for that domain (e.g. the A/AAAA record for the IP, the MX record for email, CNAME, etc.) created by step 2. Most people use their webhost's nameservers because then step 2 is done automatically by the web hosting panel when they add the domain to the web server in step 1. It also means that if your webhost changes their network or moves you to a different server, the DNS record gets updated automatically. –  Lèse majesté Jan 13 '12 at 16:10
add comment

It depends if your hoster or provider has that option. Usually very cheap hoster doesn't allow you to change DNS records. Then you must use a redirection or an iframe. You can upload a html document with a 304 redirection header or an iframe pointing to the physical storage.

share|improve this answer
    
I do have the ability to edit DNS records and nameservers etc.. –  Max Spencer Jan 13 '12 at 10:22
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.