Main Menu

Free DNS to the root

Started by Shayne, October 23, 2006, 01:26:56 PM

Previous topic - Next topic

Shayne

So i am using xname.org as one of my DNS providers however I have been unable to figure out how to make the root domain resolve.

Ive noticed that both righteouswrath.com and www.righteouswrath.com both resolve, can somebody give me a quick once over of how to set that up, everything I've googled and tried doesn't seem to work (even after giving it 24/48 hours to propagate the change).

Lazybones

I believe Melbosa uses apache vitural hosts to get the subdomains to resolve.

Question... Does your root domain not resolve to your IP or simply not result in your web server returning a page? If it doesn't resolve as an IP then it is an issue with your host, other wise it is a webserver configuration issue.

Shayne

i dont want the IP to resolve (no default domain), and all my domains resolve with www.xxxx.com but they dont resolve as xxxx.com as you would need a DNS entry for that.  I know that melbosa is using XNAME i'd like to know what he put into the "NAME" box to get that to resolve

Shayne

Hmm...see what your saying though, you could do the dirty work through Apache and have all domain variations go to the server regardless.  If this is how its setup, i still want to know whats inside the "Name" box in the "Address records" area :)

Lazybones

Quote from: Shayne on October 23, 2006, 01:56:15 PM
Hmm...see what your saying though, you could do the dirty work through Apache and have all domain variations go to the server regardless.  If this is how its setup, i still want to know whats inside the "Name" box in the "Address records" area :)

I am positive that is how melbosa has it setup, as he hosts other domains on the same IP. You will have to wait for a post from him as to what he has set on the hosting side.

Melbosa

DNS Zone Records require a bit of research to make work right.  But I'll just explain what you have wrong on yours (if it is wrong).

To make a successful DNS Zone Record, you need to assign the following:


  • Internet Address of the Domain: Called the A Record - This is the physical IP representation of your Domain.  If you have multiple Internet IPs, you have multiple A records for redundancy.
  • Name Servers: These are obviously needed to let DNS Resolution know which servers on the internet know your zone records.
  • Mail Exchange Records: IPs and/or DNS entries of Mail Servers and their costs for your domain.
  • Aliases (CNAME): These are aliases that can be accepted by the A Record and used for Host distinguishing traffic direction.

Layout of a Domain Name: www.domain.com.
www - Host Record (Alias or Physical)
domain - Physical IP of the Domain
com - Root of the Domain


What you probably did the first time, like I did is setup your A records for every possible host you would like to serve. i.e. www.righteouswrath.com, mail.righteouswrath.com, etc...

What you want to do, is only create an A record for the Physical IP of the domain, and an Alias for every host attached to that Physical IP.

So my xname.org screen looks like the attached file.

Now this isn't using proper terminology as the naming of certain things in DNS don't translate very well unless you really get into it.  So I tried to simply this for everyone here.



Sometimes I Think Before I Type... Sometimes!

Melbosa

As for my Apache configuration, I use Virtual Name Host entries to then check the host header request, and depending on whether it is a request for CNAME www or forums, I then decide what website to serve the page from.  If it is a request is for a different domain name hosted by me as well, I also take advantage of the Apache HTTP Proxy to serve multiple webservers behind my Apache Box.
Sometimes I Think Before I Type... Sometimes!

Melbosa

Don't get discouraged with DNS... it took me a couple of times of reading over my textbooks as well as working with the DNS Architect here at work to really understand what is going on and what terms/zone records to use/create.

And next I am looking into building my own DNS hosting service.  I just haven't had the time to really sit down and decide how I want to approach it (whether to use my existing internal DNS Servers at home or try to create A new set for External DNS Resolution vs Internal DNS Resolution - which most larger companies employ).
Sometimes I Think Before I Type... Sometimes!

Shayne

Fantastic, thank Mel, i did exactly like you did previously and im going to change it now.

I wish this forum had karma, id give you some :)

Lazybones

Quote from: Shayne on October 23, 2006, 02:15:18 PM
I wish this forum had karma, id give you some :)

It does, it just isn't enabled. ;)

Darren Dirt

#10
The GENERAL consensus in most web/DNS hosting service providers is to have your actual site at www.damain.com, and any attempt to visit damain.com/somepath/somefile gets auto-redirected (via HTACCESS or whatever it's called, or similar for non-Apache) to www.damain.com/somepath/somefile.

That way, at the very least, you have only one possible collection of page serves to log or process... But also it reduces the headaches of making sure "both" subdomains work.

I believe there's a good explanation on the www.NearlyFreeSpeech.net website...

- - -

update: it's actually "htdocs", and here's the info right from their "members" FAQ pages...


1.
https://members.nearlyfreespeech.net/support/faq?q=BareDomain#BareDomain
?? I have NearlyFreeSpeech.NET DNS and www.mydomain.com works but mydomain.com does not. Why?

By default, this is the correct behavior. Using URLs of the form http://mydomain.com/ creates a number of problems, and we strongly recommend that you avoid it. Some of the limitations are:

    * It creates noncanonical URLs for your site. It is highly desirable to have one URL for each page, for purposes of bookmarking, etc. Having multiple valid URLs for the same page makes your site look less popular, both in rankings and search engines.
    * It is less reliable. DNS CNAME records cannot be used in this situation. You can put in a couple of A records, but this is still not as effective for load balancing and fault tolerance as doing it the "right" way.
    * It becomes hopelessly confusing if you have (or might ever have) more than one site under the domain. (Which site does mydomain.com refer to?)
    * One name should do one thing. Bare domain names already serve the purpose of organizing the domain, and often they do email duty as well. Web traffic is better kept in its own box.

Although we disagree with this practice, you are still welcome to use it with our service. Just add the bare domain name as an alias to your site and, if you have NearlyFreeSpeech.NET DNS, our system will set it up automatically.

We strongly encourage you to consider the alternatives and implications before enabling this feature. The best compromise solution we have found is to create a separate site for the bare domain name that redirects a visitor to the real site. Visit http://nearlyfreespeech.net/ and watch what happens in your browser's address bar for an example of how this works.



2.
https://members.nearlyfreespeech.net/support/faq?q=ForwardSite#ForwardSite
?? How do I create a website for the sole purpose of forwarding visitors to another website?

You can do this by creating a one-line .htaccess file in the htdocs directory of the forwarding site. This line should look like:

RedirectPermanent / http://www.example.com/

Replace www.example.com with the name of the site that you wish to forward users to. This is good because it works for all sorts of URLs, not just the main site. For example, if you use this technique to forward example.com visitors to www.example.com and someone visits http://example.com/subdir/page.html they will be forwarded to http://www.example.com/subdir/page.html, whereas most other forwarding techniques would result in an error.

To set this up to forward http://example.com/ to http://www.example.com/:

   1. Make sure the regular name, www.example.com, works first.
   2. Create the forwarding web site. If your site is called example, you may want to call it something like examplefw.
   3. Create the .htaccess file in the examplefw website with the contents described above:

      RedirectPermanent / http://www.example.com/
   4. Add example.com as an alias to the examplefw site on the Site Information page.



- - -

^ so even if you don't/can't do the above, you at least get the "idea" of why/what needs to be done. :)
_____________________

Strive for progress. Not perfection.
_____________________

Cova

Quote from: Darren Dirt on October 23, 2006, 03:12:06 PM
The GENERAL consensus in most web/DNS hosting service providers is to have your actual site at www.damain.com, and any attempt to visit damain.com/somepath/somefile gets auto-redirected (via HTACCESS or whatever it's called, or similar for non-Apache) to www.damain.com/somepath/somefile.

By far the most common setup when both domain.com and www.domain.com give you the same resulting page is NOT using re-directs.  Simply both names resolve to the same IP, so you connect to the same server and it gives you the same page back.  This ONLY breaks if your site is hosted behind something that depends on host-header-name redirection, which is what is used when multiple sites are hosted behind a single IP address.  Virtually everything hosted at Melbosa's place is behind a single IP, and he uses an apache server using host-header-names to redirect traffic to the proper site/server - and in such a setup it is still MUCH better to point both names to the same internal site rather than using re-directs to a single name.

Re-directs are BAD!  Good site design/architecture will remove as many as possible.


Also - this whole discussion has been turned away from the question that was originally asked.  "how to make the root domain resolve" has NOTHING to do with web pages or HTTP - it is a DNS question and was answered nicely by the screenshot that Melbosa attached, showing how righteouswrath.com resolves to an IP, and how www, ftp, etc. are cname'd to that IP.

Quote from: Melbosa on October 23, 2006, 02:06:37 PM
What you want to do, is only create an A record for the Physical IP of the domain, and an Alias for every host attached to that Physical IP.

That advice would only apply to a home use with a single IP.  An 'A' record in DNS is a "host record" - every host (read: thing with an IP address, eg. computer, router, toaster with ethernet, etc.) should have an A record.  When a single host serves multiple functions (eg. web and mail) you can use cname records to give a single host multiple names.  So you could have a setup with an A record for server.domain.com pointed at mail.domain.com and www.domain.com.  Or in the case of RW - a host record for the root of the domain, and cname's pointing all of the common service names back to it.

Also keep in mind that there is NOTHING requiring the use of the 'common' names that everyone seems to assume are required.  Web sites don't have to start with 'www' - forums.xxx.com and support.xxx.com are a couple examples that are quite common.  You can put ANYTHING that resolves to an IP address into a browser, and it will attempt to make an HTTP connection on port 80 to that address.  You could setup your MX records (the part of DNS that makes e-mail work) to use www.domain.com for e-mail @domain.com and give out http://mail.domain.com as your web address.

Melbosa

Quote from: Cova on October 23, 2006, 05:13:15 PM
Quote from: Melbosa on October 23, 2006, 02:06:37 PM
What you want to do, is only create an A record for the Physical IP of the domain, and an Alias for every host attached to that Physical IP.

That advice would only apply to a home use with a single IP.  An 'A' record in DNS is a "host record" - every host (read: thing with an IP address, eg. computer, router, toaster with ethernet, etc.) should have an A record.  When a single host serves multiple functions (eg. web and mail) you can use cname records to give a single host multiple names.  So you could have a setup with an A record for server.domain.com pointed at mail.domain.com and www.domain.com.  Or in the case of RW - a host record for the root of the domain, and cname's pointing all of the common service names back to it.

Also keep in mind that there is NOTHING requiring the use of the 'common' names that everyone seems to assume are required.  Web sites don't have to start with 'www' - forums.xxx.com and support.xxx.com are a couple examples that are quite common.  You can put ANYTHING that resolves to an IP address into a browser, and it will attempt to make an HTTP connection on port 80 to that address.  You could setup your MX records (the part of DNS that makes e-mail work) to use www.domain.com for e-mail @domain.com and give out http://mail.domain.com as your web address.

Very good advice.  Yes I didn't get into talking about multiple IPs per single domain, nor did I want to complicate the answer with Multiple Hosts and Alias to Hosts.  Cova is exactly right, and yes when talking domain structures and DNS Resolutions, you would want Host records for every Physical IP.  But with simple hosting on the internet, most people will not go this route.

As for the second, again a good point.  Righteous Wrath is an example of this, as the forums.righteouswrath.com is one of those you give an example for.  Good additions to an already long thread about DNS :P.  Never knew this would give such a discussion.
Sometimes I Think Before I Type... Sometimes!