# DNS settings with www and without

## Deepak420

I'm no DNS expert, and I'm hoping someone would be able to help me with this issue I'm facing.

I have a set of links in the following schema:

```

http://somedomain.com/xyz

http://somedomain.com/abc

http://somedomain.com/123

```

and they are pointing to content at:

```

http://www.somedomain.com/xyz

http://www.somedomain.com/abc

http://www.somedomain.com/123

```

but the top link fails to reach the correct content.

As it stands the DNS configuration looks like:

```

@ 3600 NS ns1.namesforyou.com.

@ 3600 NS ns2.namesforyou.com.

www 3600 CNAME foo.bar.someotherhost.com.

* 3600 CNAME foo.bar.someotherhost.com.

```

Any way I'd be able to have these links behave properly without a CNAME root record?

----------

## Hu

Could you explain what you mean by "fails to reach the correct content"?  It is not at all clear to me how I would replicate your setup or debug the problem.  What HTTP server are you using?  How is it configured?  When you reference links, do you mean you have an <a href> in an HTML document?

----------

## Deepak420

The server is unknown and I'm not able to configure the DNS server myself.

Basically what is happening is that I'm hosting content at foo.bar.someotherhost.com and this machine is getting traffic from a domain name owned and configured by a second party and the content published by a third party. My restriction is that the content cannot be changed (first set of links) and I cannot have a CNAME for the root record. The DNS is configured such that traffic directed at http://www.somedomain.com/abc succeeds in bringing the viewer to the correct content at foo.bar.someotherhost.com/whatever but traffic directed at http://somedomain.com/abc fails. Is there any way I can have the DNS reconfigured so that the link http://somedomain.com/abc is treated the same as http://www.somedomain.com/abc?

----------

## Hu

You might be able to fix this with a DNS record, but I doubt it.  From the horribly vague description you gave, it sounds like the party of the second part is using HTTP redirects.  If so, his httpd will need to map both names to a VirtualHost that has an appropriate redirect rule.

----------

## AngelKnight

 *Deepak420 wrote:*   

> 
> 
> (...)
> 
> As it stands the DNS configuration looks like:
> ...

 

If the IN A record for "foo.bar.someotherhost.com." is stable (e.g. has a fixed set of at least 1 or more values that doesn't change), make sure there's a RR for "@" with IN A set to the same set of IPs as foo.bar.someotherhost.com.

One caveat: the webserver on foo.bar.someotherhost.com needs to be prepared to accept HTTP requests with HTTP host header "somedomain.com" as well as "www.somedomain.com" (which presumably work, but which you have not asserted yet in your posts here).

If this is confusing, the takeaway sentences are: "There's more than DNS going on to make this setup work right.  Read up on both DNS and HTTP virtual hosting."

----------

## Deepak420

First off, thanks for the help!

I was considering the A record, but I'd prefer to not use it since the IP of the server could change at some point.

We were able to set up an intermediary that redirects any requests without www and adds that on so that the correct page is accessible, so this thread could be considered solved.

Apparently their implementation is bind, and they're claiming that it doesn't support a CNAME RR which doesn't sound at all correct to me but I don't have the wherewithal to state that definitively.  :Rolling Eyes: 

----------

