EzDevInfo.com

dns interview questions

Top dns frequently asked interview questions

jquery, domain, get URL

How can I get the domain name with jquery ??


Source: (StackOverflow)

Create Subdomains on the fly with .htaccess (PHP)

I am looking to create a system which on signup will create a subdomain on my website for the users account area.

e.g. johndoe.website.com

I think it would be something to do with the .htaccess file and possibly redirecting to another location on the website? I don't actually know. But any information to start me off would be greatly appreciated.

Creating a sign up area is not the problem - i have done this many a time. i am just unsure where to start with the subdomain.

Thanks, Ben.


Source: (StackOverflow)

Advertisements

Mac OSX Lion DNS lookup order [closed]

After upgrading to Mac OSX Lion I figured out that /etc/hosts is not looked up in first place for name resolution anymore. This leads to some side effects like:

  1. Entries in /etc/hosts are resolved painfully slow
  2. You can't not override existing domains, e.g. 127.0.0.1 www.google.com
  3. If you get search domain entries from DHCP, let say .lan, and some funny guy configured localhost.lan to something else then 127.0.0.1 in the local DNS you can not reach your localhost anymore.

Is this behavior intended? Does it make any sense? And most important, how can I come back to the old behavior.

Thanks in advance


Source: (StackOverflow)

Set up DNS based URL forwarding in Amazon Route53

I'm trying to setup forwarding in Amazon Route53. My last DNS service (Nettica) allowed me to route requests to "aws.example.com" to "https://myaccount.signin.aws.amazon.com/console/".

Is this functionality supported by Route53?

How does Nettica achieve this? Does it insert a special A, CNAME, PTR, or TXT record(s)?


Source: (StackOverflow)

Regular expression to match DNS hostname or IP Address?

Does anyone have a regular expression handy that will match any legal DNS hostname or IP address?

It's easy to write one that works 95% of the time, but I'm hoping to get something that's well tested to exactly match the latest RFC specs for DNS hostnames.


Source: (StackOverflow)

Custom domain for GitHub project pages

I have a gh-pages branch in one of my http://github.com repos. The GitHub project pages works fine if I go to http://myuser.github.com/myrepo

I want to setup a custom domain (myexample.com) that will serve up this project pages. I want both myexample.com and www.myexample.com to serve up these project pages.

GitHub pages help says to make an A record and a CNAME record in your DNS. The A record makes sense, but I do not know what CNAME record to make in my DNS.

The gh-pages docs say to make a CNAME record for 'charlie.github.com' which is a user page repository. I do not have a user page repository - I only have a project repository and a gh-pages branch that I want to use for myexample.com and www.myexample.com.

Do I need to make a user page repository just so I can use my project page for www.myexample.com and myexample.com?

I would just try it, but I want to make sure this will work as I already have www.myexample.com live and don't want to make a mistake.

I emailed GitHub support and their response was

You can't have both point to the same gh-pages as far as I know.

I find it hard to believe they would only support A records for project pages.

Has anyone successfully done this before?


Source: (StackOverflow)

How do I find the authoritative name-server for a domain name?

And for extra credit - Is it possible to find the origins of conflicting DNS records?


Source: (StackOverflow)

What is the difference between 127.0.0.1 and localhost

Assuming the following is defined in .../hosts:

127.0.0.1 localhost

What, if any, are the actual differences between using 127.0.0.1 and localhost as the server name, especially when hitting processes running locally that are listening for connections?


Source: (StackOverflow)

Get protocol,domain and port from URL

I need to extract the full protocol, domain and port from a given URL. For example:

https://localhost:8181/ContactUs-1.0/contact?lang=it&report_type=consumer
>>>
https://localhost:8181

Source: (StackOverflow)

Static hosting on Amazon S3 - DNS Configuration

I'm working on a little webapp (all client-side) I want to host it on Amazon S3. I've found several guides on this and have managed to create myself a bucket (with the same name as my domain), set it as a website and upload some content.

Where I'm struggling, and where all the documentation starts to get a bit vague, is how to properly configure my DNS.

All my registrar (123-reg) could suggest was web forwarding which gives me mydomain.com.s3.amazonaws.com

What do I have to configure, and where (ie. 123-reg / Amazon) can I get a clean URL?


Source: (StackOverflow)

Can I use the /etc/hosts file to configure an alias [closed]

The /etc/hosts file can be used to override dns definitions, i.e. to point an hostname to a different ip.

I want to use /etc/hosts to make an alias record, i.e. to make my computer think that www.mysite.com does not point to a "hard coded" ip but instead is synonym of mychangingip.myip.com.

Can it be done?


Source: (StackOverflow)

How do I get a list of all subdomains of a domain? [closed]

I want to find out all the subdomains of a given domain. I found a hint which tells me to dig the authoritative Nameserver with the following option:

dig @ns1.foo.bar some_domain.com axfr

But this never works. Has anyone a better idea/approach


Source: (StackOverflow)

Does hosts file exist on the iPhone? How to change it? [closed]

I am developing an application that query to the server. In my Mac, I use the hosts file to change the dns to point to a local server within my local area network.

Now I need to test it with my iPhone, the problem is that my iPhone does not recognize that server due to the missing configuration for dns.

On my Mac or Windows, I simply add: 192.168.0.20 http://www.google.com to the hosts file.

Now how do I let my iPhone know the URL: http://www.google.com ?

Please help!


Source: (StackOverflow)

Can (hostname) subdomains have an underscore "_" in it?

Can subdomains (hostnames) have underscore "_" in them?


Source: (StackOverflow)

I bought a domain and I want to apply it on my Amazon Ec2 instance? [closed]

I have an Amazon EC2 instance with public DNS: ec2-123......amazon.com

How do I change the public domain from ec2-123......amazon.com to mydomain.com?


Source: (StackOverflow)