I've currently got an ASP.Net site hosted with DiscountASP.Net what I would like to do now is put a second site in a subdirectory of this original site and register a new domain to point at the subfolder, so to the end user its 2 completely seperate sites. I've asked DiscountASP support if they could do this and they just say they dont support it and wont help.

If I registered the second domain with someone like 123-reg is it possible to make that domain point to a subdirectory in my main site?

If not I may have to put some sort of redirect on my route index page that sends you to the right page based on the URL you requested but I would really rather not have to go there. I don't want to buy an additional account as the second site is just a bit of a side project that may well go no where.


You cannot point a domain name to any directory, it's the web server which does that job.

A domain name points to a web server with a specific ip-address. If your web hotel doesn't support several domain names with their own folders, then there's not much you can do about that.

What you can do is to check with them if they support so called "multiple domain pointers". It means that multiple domain names point to a certain domain name, and server directory. Then you can write a .net-script which takes care of the redirects depending on the domain name the user types in, just like you have mentioned.

  • I realise I cant point a domain at a directory but was wondering if any registras/DNS hosts would allow me to do some sort of silent forward on the domain name. Looks like I may have to implement something myself. – Gavin Dec 8 '09 at 18:04
  • Some web hosting companies/registrars do that, it's called "domain forwarding". But since DNS doesn't have support for directories, you will end up with a frames solution. – TFM Dec 8 '09 at 20:16

If you use Everydns as your dns provider, you can do redirects...

...However, see if discountasp.net allows you to set host headers / additional domains or anything similar and if they do, simply set one for your new domain then Set DNS records to be the same as your existing one and then in your default/index page (assuming ASP) write something along the lines of:

<% if request.servervariables("SERVER_NAME") = "mynewdomain.com" or request.servervariables("SERVER_NAME") = "www.mynewdomain.com then
end if %>

This should then forward anyone with the correct domain name to the sub directory of newsite.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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