Universal list of domain endings? - dns

Does anyone know where I could find a list of all publicly available domain endings? By "domain endings", I'm not necessarily referring to TLDs as I'm not interested in the .uk part of .co.uk since (AFAIK) individuals cannot register sites without having the .co preceding it.
If it helps to make things more concrete, here's my specific problem: given a domain name I want to return both the version of the domain preceded by www and the version not preceded by www. The input domain may or may not contain www.
The complication comes from the existence of domain names such as "www.com" or "www.info"; what I initially implemented would take www.info and return info and www.info.

I don't think you actually need to have a list of domain names:
given a domain name I want to return both the version of the domain preceded by www and the version not preceded by www
Pseudocode:
input name
does it begin with "www."?
if yes, strip out "www."
there's your domain name, save it
prepend "www." to domain name
save the result
lookup in DNS both the saved entries
if they exist, output them

You can get the list of current TLDs in many ways, slightly differently.
For example:
Going to IANA website at https://www.iana.org/domains/root/db (this is frequently updated after a new TLD got delegated in root zone)
Or just download the root zone file through the appropriate links: http://www.internic.net/domain/root.zone or ftp://rs.internic.net/domain/root.zone
You could also just query one of the current root nameservers that allow AXFR requests to just download the current root zonefile, such as dig #f.root-servers.net . AXFR with the added benefit that this is protected by DNSSEC (where the previous HTTP URL has no protection against tampering)
Of course this gives you only "Top Level Domains" not all "suffixes" under which a registry exists to allow the public (in general or part of it) to register domain names.
Having the list of those is currently still an unsolved problems, if you take into account the needs of automated process, freshness, decentralization of updates, etc.
The best solution is to use the Public Suffix List at https://publicsuffix.org/list/public_suffix_list.dat but first make sure to go to main site at https://publicsuffix.org/learn/ to learn in details about what it is, how to use it and its shortcomings.
You will find co.uk there.
But as for your:
in the .uk part of .co.uk since (AFAIK) individuals cannot register sites without having the .co preceding it.
This is not true anymore, showing that eligibility requirements in TLDs, or even structure, change over time. .UK is open to direct registrations now, see https://www.nominet.uk/domains/our-domains/uk-domains/
And also, side rant, when you work with domain names/TLDs please do not forget about IDNs, that could happen in any label in the DNS.

Related

Is it possible to create a domain with another word before the. and the rest of your URL? (Closed)

so basically I'm trying to make a secondary domain that is about.wyrnz.com and I was wondering if I have to buy another domain or if it is possible to do that without buying a new domain?
Thanks everyone for replying! I've worked it out now so this is now closed!
As soon as you own a second level domain (wyrnz.com), you can create as many sub-levels as you want. That includes third level (xxx.wyrnz.com), but also fourth (yyy.xxx.wyrnz.com) and as many levels you want.
That also depends on you host. I know that some hosts restricts the number of sub-domains you're allowed to create.
If www.wyrnz.com is your domain you should not have to buy another domain. In fact, you can not even buy it, you already own it. about.wyrnz.com is a subdomain of wyrnz.com.
What I did is:
Create a subfolder on the webserver, create a subdomain and point the subdomain to that folder. Every time someone types in about.wyrnz.com, the index page in the subfolder will be served to the user

Use htaccess mod_rewrite to hide domain name

I've read lots about what can be done with mod_rewrite but I haven't found one to solve my problem. Maybe it can't be done?
I have a sub-domain on my primary domain that I have a customer direct user to to use one of my programs. The customer doesn't want his customers to see that that are on my domain and he doesn't want to use an iframe.
So, is it possible for the user to only see www.subdomain/program.php instead of www.subdomain.mydomain.com/program.php?
If you want the browser to show www.subdomain/program.php in its location bar, you need to register the www.subdomain domain name. There is no way to remove bits of the domain name using anything in the htaccess file. For example, if you've registered example.com and you have a server at foo.example.com, and you want to be able to go to http://foo/some/path/index.html, you're out of luck because the browser is going to attempt to do a DNS lookup of foo and it will most likely fail unless there happens to be a "foo" server under the DNS search domain. Browsers put a great deal of effort to prevent spoofing of the domain name, since it would be really bad if I was able to spoof my website to show the domain of a bank in a browser's location bar while actually visiting an entirely different website.

Is there a way I can find the canonical domain name for a list of websites?

I'm working on a page tracking web app and I'd like to get the canonical domain for a list of sites. As far as I know there is no good way of telling where a site's ownership of subdomains and top level domains starts and ends. I'm not sure the best way to describe that, so here is an example:
If I own a personal URL, mysite.com, I am able to set up subdomains such as www.mysite.com, cdn.mysite.com, and so forth.
If my "group" has a website at a university, such as computerscience.myuni.edu, I might have also have control over www.computerscience.myuni.edu, but not myuni.edu
If I am a huge business and and need to spread web traffic out, I might even have www.acme.com, ww2.acme.com, ww3.acme.com, etc.
So nothing is certain but if I'm given a URL I can probably strip of www., ww2., and cdn., and maybe secure. from the front, but are there any other common "subdomains" that I'm not thinking of that are fairly common and generally not used to serve up a different website?
I'm guess I'm just trying to figure out the best way to get the real "canonical" domain name for a site.
First of all, you should make the distinction between Domain Names and Websites/URLs.
I don't think there was any efficient way to identify easily a website owner but concerning the domain name, it can be deduced through its structure.
Roughly, a Fully Qualified Domain Name is composed by the subdomain(s), the name and the suffix, and in your case, you are looking to find the canonical domain name (name + suffix).
Since the Domain Name System is hierarchical, a FQDN like www.example.com. should be read from the end to beginning: .com.example.www and could be decomposed this way:
Suffix: com
Name: example
Subdomain(s): www
For your identification, you should proceed in the same order:
Suffix: Find the suffix under which the name has been registered (.com, .net, .co.uk, .com.es)
Name: Identify the first name just after the dot
Subdomain(s): strip the rest of the string.
There is no official Database listing all the public suffixes, however at the initiative of the Mozilla Foundation an unofficial one has been created. The project is named Public Suffix, which aim is to record suffixes, under which people could register domain names and have several implementations to parse the database.
I wrote an article on my personal blog introducing the domain name system, if you are interested, where I describe the domain name structure in more details: What's a domain name and what's behind the scene

Trying to set up a .ka domain name

I'm trying to set up a domain with the .ka suffix for a URL shortener for a project I'm working on. Similar to drbl.in for example. I've checked online and this suffix doesn't seemed to registered to any country yet or appear of any domain name service. Any ideas on how to fix this up, or if its even possible?
Thanks
There is no .ka TLD. So you'll have to pick a different one.
Full TLD List: http://data.iana.org/TLD/tlds-alpha-by-domain.txt
Here is a list of all top-level domains. Since .ka is not on that list, you cannot register a domain ending in .ka.
In terms of having that domain added, refer to the IANA procedure for establishing new country-code TLDs. The short version is: pick a new suffix.
As the others have said, the .ka domain extension does not exist.
It's quite difficult to get a new domain extension approved. ICANN, which accepts applications for making new TLDs, opens this registration process only every few years and it is also quite expensive.
Here's more info on getting your own TLD: https://theaudacitytopodcast.com/afilias-explains-how-to-get-your-own-top-level-domain-tld/
If you're only after domain hacking and are not too particular about the spelling (as long as it sounds the same), then you might want to consider a .ca domain instead.
If you're interested, you can check if your domain hack is still available here:
https://www.marcaria.com/ws/en/domains/canada-domain-registration-ca

DNS two domains one server

Greetings All,
Long time reader first time poster.
I work for a small school district. We are our own SOA so we can pretty much do what we want.
In the state of Washington all educational institutions are given a name like myschools.wednet.edu. I've recently purchased a new and hopefully easier to remember domain myschools.org and I'd like to use both domains and have them point to the same information and subdomains i.e. helpdesk.myschools.org would equal helpdesk.myschools.wednet.edu. I'd also like this to work with e-mail but I think this is a bit more complicated.
I'm sure this has been done, but I'm not entirely sure I'm asking the question in a way that can be easily answered.
Any and all help is appreciated.
TIA,
Dave
To do this, you'll have multiple DNS record entries (A-Recs) pointing to the same IP Address. You may also need to tweak IIS (or your web server software) to accept requests coming from both domains.
So...in your DNS manager (e.g. in Register.com or whereever you manage your domains) change the A-Rec to point myschools.org (your domain) to the same server IP address where myschools.wednet.edu is currently pointed (I take it that you told them where to point the subdomain).
If you are using IIS then setting up multiple domains on one web site is easy. You'll create just one web site (or use the one to which wednet.edu points). Next, right-click the web site in IIS and choose Properties. On the "Web Site" tab, click "Advanced" and in the resulting dialog, use the "Add" button to add your additional domains/subdomains. That's all you'll need to do.
Hope this helps!
If you want lots of subdomain entries to map from one domain to the other then you'll need to either add A or CNAME records in the new domain pointing to the old domain.
In most cases I'd recommend a CNAME, however if you want the unadorned "myschools.org" domain to respond to HTTP requests that would have to be an A record, because you can't put in a CNAME at the top level of a zone.
Alternatively, there's a relatively new DNS record type called DNAME which can map an entire domain to another in one fell swoop. Unfortunately it's not widely supported yet.
All you should do is create two 'A' records, one of host-type '#' and the other one of host-type 'www' both should point to the IP address of your server.
It could be a bit confusing, here's an example of how to set it up #GoDaddy's:

Resources