Link to home
Start Free TrialLog in
Avatar of IT Support
IT SupportFlag for United Kingdom of Great Britain and Northern Ireland

asked on

redirect mydomain.com to www.mydomain.com without ip

Hi All, I hope you are well.

A web designer has designed a site that is hosted somewhere other than where the dns is for one of my customers

He has said that he needs to create a dns entry that will forward http://mydomain.com to http://www.mydomain.com, but he hasn’t got an ip address, only a name (somesite.somehost.com). the ip that this name eventually resolves to will change over time, hence the need for a name.

I effectively need to create a cname for the root of the domain, but obviously I cant do that.

I cant use a 301 redirect either, so I don’t know what to do.

I don’t want to move the dns from where it currently is if I can avoid it.

What I am thinking is I need a service that will give me a static ip address so I can set up a blank A record to point to it. That service will then translate the ip address to the name somesite.somehost.com

I was looking at webhops from dyn, but im not sure if that will work –

anybody got any advice please?
Avatar of asavener
asavener
Flag of United States of America image

Are you talking about doing this for external DNS, or is this your internal (Active Directory) DNS?
Avatar of IT Support

ASKER

external
SOLUTION
Avatar of asavener
asavener
Flag of United States of America image

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
yeah, i agree, but he tells me he cant do that.

i can only do stuff with the dns. he keeps telling me that they can do it with godaddy dns so why cant we do it with our dns hosts. ive said that you just cant do that in dns, it has to be done on the webserver (and again as you say with a 301) but he "disagrees".
ASKER CERTIFIED SOLUTION
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
he tells me he cant do that.

Other people can....  ;)

(I know, I know.  This is someone else's project and you got pulled in after the check was written....)
i agree! ive even sent him the rfc.

godaddy (or 123reg) seem to allow you to put a "*" record into the dns console which allows you to put a name instead of an ip address in it.

it then does this redirect somehow, but even if its in the dns "console" there, it cant actually be in the dns.

what do i do??

all i can see to do is at current dns, put blank A record in with an ip.

get that ip address to translate to a name, then we are good. basically a "dns bridge". its like reverse ddns. which is dns!

is there such a service?
thanks for the serverfault link by the way, i hadnt seen that
Wildcard records are allowed, and used extensively, but I don't know whether it will redirect for the root of the zone.  

A wildcard will redirect anything that doesn't resolve otherwise.   Mail.domain.com, ftp.domain.com, etc. will continue to work, while *.domain.com will redirect any other addresses entered to the www page.   Prevents a page-not-found error if someone fat fingers the address.
Good discussion of wildcard records, here:  https://en.wikipedia.org/wiki/Wildcard_DNS_record

To quote RFC 1912, "A common mistake is thinking that a wildcard MX for a zone will apply to all hosts in the zone. A wildcard MX will apply only to names in the zone which aren't listed in the DNS at all."

So by the RFC, a wildcard should not redirect the root of the domain, since the root has SOA, NS, and possibly MX records associated.
we have one of those, and it works but not for the root


name *
type cname
data somehost.mysite.com

what you say about a wildcard of the root makes sense as you say,  because then all the other records will be invalid, and you would be just pointing the dns at the place where the wildcard is.

you can do what we want with an A record, but then you have to put an ip address in, not a name.
SOLUTION
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
So I don't think this is solvable purely from the DNS server side.

I still don't understand why the web guy thinks it's OK to have a website on a machine with a dynamic address.  If the address changes, then the site will be down until the TTL on the cached DNS entry expires everywhere and people are forced to query the authoritative server....

Is he trying to set up some kind of failover or global traffic manager or something?  DYN and other providers will do it better.
I agree completely.

-saige-
me too!

thanks for the clarification.

i'll leave this open for a bit in case anyone has a better idea...you'll get your points in due course!!
apparantly go daddy do allow you to put a blank cname in
Yes.  You would have to transfer your DNS to GoDaddy.

Even then, however, you're dependent on GoDaddy to continue allowing non-RFC Compliant DNS entries.
yes, totally agree. i dont want to move it, but im in the middle of the customer and the web guy. however,the web guy seems to be coming over to my way of thinking.
guys - what do you think of this:

https://support.dudamobile.com/02DudaOne/Domain_Setup/GoDaddy

what actually is this? is it actually a blank cname?
Looks like they created a wildcard CNAME record.
is that a sensible thing to do?
It's what we just decided is not supported by the RFC.  It might work but it is not official and may not be supported by other DNS providers.
The right way to do this would be to have an A record for domain.com that points to your web server, and a wildcard CNAME that points to domain.com.

Alternately, just have a www A record, and forget about redirecting from domain.com.