Link to home
Start Free TrialLog in
Avatar of RedDoorSupplies
RedDoorSupplies

asked on

DNS URL Forwarding

Hi is there a way to forward a URL just using DNS?

I have tried creating a cname but this doesnt seem to work as im asuming the server I am trying to forward to doesnt regonise the incomming domain name.

Currently I have a server running IIS that I do it from but im looking to shut this server down so if there is a better way to do this that would be great.

Thanks
Avatar of Santosh Gupta
Santosh Gupta

how you have created the cname record plz share the sample.
Avatar of Gary
You can't forward a url with DNS, you can add a sub domain and set the ip of the sub domain to another server.

If you are shutting the server down then just set up the new server with the same DNS etc, change your nameservers to point to the new domain.  Then leave the old server up for at least 48 hours, by which time you can be certain that the new domain name resolution has completed.
Avatar of RedDoorSupplies

ASKER

Ok that is what i thought.

Im merging my websites with Azure's hosted service which is not a problem but I wont have a server as such so was looking to see what the best way or forwarding the URL of the sites that currently go via the server but are not hosted by it.

Thanks
So you just need to change your nameservers.
No.

I host the domain myself on my own name server and separate IIS server. In some cases a 3rd party company host the website but the www records still points to IIS server that we own.
All that is currently done is the IIS server tells www.test.com to forward to www.abc.com

I would still like everything to function that was but without the need for an IIS server.
Have a read through
http://blogs.msdn.com/b/windowsazure/archive/2013/11/21/a-records-cname-and-using-dns-with-windows-azure-web-sites-waws.aspx

You can ignore the first few paragraphs, but it goes through setting up the CNAME to point to your site.
make  www.test.com a CNAME to www.abc.com or set www.test.com to point to your cloud machine (which you already did, i guess)

i assume this does not work because you have setup a name based virtual host on the cloud machine for www.abc.com instead of www.test.com. just set www.test.com as a secondary name, alias, or whatever your server calls it for the corresponding web site.

a dirty workaround could be to setup a proxy on the cloud machine

does the above seem to be the problem ? if you can't solve it, please post info regarding which server is used to host stuff on the cloud machine, and possibly it's vhost configuration
Thanks for the replies still been trying but cant seem to get it to work.

Basically say I just purchase a new domain name but don't have any site or holding page yet what I might want to do is redirect it to google for example rather than having page cannot be displayed error.

So www.newdomain.com forwards to www.google.co.uk

If I try it with the cname it does not work as im guessing googles servers don't recognise the www.newdomain.com address so wont display the page.

Currently I would get round this by using IIS. So the www.newdomain.com points to my IIS server which I can do a simple URL forward which works fine.

It seems a bit silly to have a full server running just to forward some domains like above so was hoping there might be a better way of doing it.
If I have to deploy a new IIS server to do it that's not a problem but would prefer not to!

Hope that all makes sense!
if the remote server makes use of name based virtual hosting, it will not work whatever you do in the DNS.

if you don't know what name based virtual hosts are, either google it up or ask in this thread

also note that information such as "this doesnt seem to work" or "cant seem to get it to work." is useless. you need to post what you did, what you expected to happen, what happened and possible debug steps you took with the results.
ASKER CERTIFIED SOLUTION
Avatar of RedDoorSupplies
RedDoorSupplies

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i assume this does not work because you have setup a name based virtual host on the cloud machine for www.abc.com instead of www.test.com. just set www.test.com as a secondary name, alias, or whatever your server calls it for the corresponding web site.

did you even try changing the name of the vhost or setting a secondary name ?

If I try it with the cname it does not work as im guessing googles servers don't recognise the www.newdomain.com address so wont display the page.

nothing google-related, but that's about what happens on the cloud server. you just need to tell the cloud server that you host www.newdomain.com which is trivial to do whatever the server

It seems a bit silly to have a full server running just to forward some domains like above so was hoping there might be a better way of doing it.
If I have to deploy a new IIS server to do it that's not a problem but would prefer not to!

true. too bad you were almost there and did not even give it a try. feel free to ask for help if you change your mind
Had to use a new server to get the outcome I wanted