5ubliminal@twitter

I Own .dev Top Level Domain - TLD : 5ubliminal's TellinYa

<a href="http://www.tellinya.com/art2/246/">I Own .dev Top Level Domain - TLD : 5ubliminal's TellinYa</a>
5ubliminal's YAMS
I own .dev TLD!

After years of struggling I managed to get ownership of the only TLD I care of. .dev as in developer is now mine… all mine! Seek evidence below:

Ok… Let's get serious again…
Of course I don't own .dev TLD!
But… I'll teach you how to get any domain/subdomain working on your Windows computer in less then 5 minutes. And this will be of enormous help for your developement environment.
A Coder's Developement Environment.

I've had a no-ip.com paid subscription for two years now and it has been the best investment I have ever made online. 10$/yr allow me to own any subdomain with them and each subdomain can have an unlimited number of subdomains by just checking a simple checkbox. Check this screenshot!

Btw… they don't offer an affiliate programme so this review is sincere. It helped me a lot with customers (back in the days when I worked for others) and I could show them my work at anytime from my own computer with this dynamic DNS service.

But you can host your own DDNS!

In 90% of situations, unless someone else has to see your work, you can host your own dynamic DNS service and have any domain/subdomain work. And this is all thanks to Microsoft, the company that thinks about the people.

Understanding the hosts file!

Hosts file is a file with no extension located at one of the following addresses depending on your Operating System:

  • Windows 95/98/Me %windir%\hosts
  • Windows NT/2000/XP Home/XP Pro %windir%\system32\drivers\etc\hosts
  • … I use Win XP x64 Pro and I don't know if it's available in Vista.

The hosts file is a very simple text file that has one entry per line. If the line starts with # it is considered a comment otherwise it needs to have the following format:

127.0.0.1[space]localhost[space]#optional comment

Actually the entry above exists in hosts and defines the localhost we all use.

Gaining quick access to it!

As a developer you need to be fast. And many times you need to add hosts/subdomain quickly. As I said the hosts file has no extension so editing it is quite cumbersome. Right Click - Open With - Notepad! This is not the cool and smart way. Just follow the easy steps below for the smart way:

  1. Copy (Ctrl+C) the path of hosts that matches your OS from above (usually: %windir%\system32\drivers\etc\hosts)
  2. Start - Run - %windir% [hit enter]
  3. Right Click Menu - New - Shortcut
  4. Type in address field: notepad Paste (Ctrl+V) here path of hosts file [hit Enter]
  5. Type hosts in the field [hit Enter]

If you could not follow the steps above please close this page. If you could you will have in your windows directory and new shortcut named hosts! Not go to Start (Ctrl+Esc) - Run - hosts [hit Enter]. This is the easy way to edit the hosts file.

Editing the hosts file:

Let's say your site needs the following domains to work: domain.com, www.domain.com, admin.domain.com. And they need to load from the local host (local developement environment). Then you hosts file need to look like this:

127.0.0.1     domain.com
127.0.0.1     www.domain.com
127.0.0.1     admin.domain.com

It can't be easier then this. If you need a site to load from a different IP just change 127.0.0.1 to another, let's 192.168.0.5 - a network computer where the webserver runs. Warning: by setting 0.0.0.0 as IP that host will be locked. So if you want to block access to a certain hostname (block some ads) just add it with 0.0.0.0 in front.

The only downside of hosts!

Hosts does not accept wildcards. You can not set 127.0.0.1 *.dev to take control over an entire TLD. You need to set each project, each domain/subdomain in the file. No IP offers * CNAME but not everybody needs it.

Other issues you might have may be the following but, keep in mind, I do not consider them issues.

  • Others can not access you site EXCELLENT
  • Toolbars like Google / Alexa and so on will not find your site EXCELLENT
  • When sending external visits with referer others will see the referer but will not find your site AWSOME
  • If the site you choose exists you block your own access to it GREAT - just don't add Google.com

So, by using hosts instead of no-ip.com or other such services, you protect your and your developement environment's privacy. But you will need to add each subdomain by hand as * wildcards don't work.

Combining with Apache!

First of all make sure the Apache httpd.conf has the following two lines (use Ctrl+F to find them) uncommented (no # found in front):

  • LoadModule vhost_alias_module modules/mod_vhost_alias.so
  • Include conf/extra/httpd-vhosts.conf

In conf folder in Apache you will find the extra folder with contains the vhosts file. Open it with notepad and add the following to get the domain.com to work along with any subdomain also. Replace \ with / in the-full-path-of-your-site as Apache knows this version better.

<VirtualHost *:80>
DocumentRoot "the-full-path-of-your-site"
ServerName domain.com
ServerAlias *.domain.com
</VirtualHost>
The bold line in the code makes any subdomain work and you just handle them with .htaccess!

I'm INPT… not an expert in explaining stuff!

I think it's all explicit enough. I assume you already use Apache and PHP or something else to develop and you know how to add new hosts. So the only trick is the hosts file which will replace your current DNS.

If you used to develop sites with localhost/site/… change now and get the feel of domain/subdomain based developement. This will also help you get used to SEO, learn how to redirect non-www to www version of site and so on. You will know exactly how your site will behave online running on a domain root address.

If there's stuff you did not understand well hit me back in the form below. And I'll do my best. I might have been a bit supperficial as it's all too easy for me but it's one of the longest tutorials I wrote.

PS: If you like it… link it;)

7 Comments Posted By Readers :

Add your comment
#1 Garcia from Bolivia web
Posted on Saturday, 24 November, 2007
There's Host Administrator that helps you manage hosts file easily. The problem is that it doesn't work on Vista, according to a friend that tried it for me.

Here's a link: http://www.mediafire.com/?f20tqtwk9xf

I hope it helps.
#2 5ubliminal web
Posted on Saturday, 24 November, 2007
I honestly don't trust this kind of freeware stuff. And I have my own PHP script made for management. Be carefull with what you download from obscure freeware sites.
The Software does not work in Vista or the hosts file does not exist in Vista anymore?
#3 Garcia from Bolivia web
Posted on Saturday, 24 November, 2007
Why wouldn't you trust it? I've been using it for a long time and it really helped me through rough times (lol). Seriously, it works.

Btw, you shouldn't only use Opera to browse your site. If you use IE6, you'll notice the layout is messed up.
#4 5ubliminal web
Posted on Saturday, 24 November, 2007
It looks as it should in IE7. I don't have IE6… I upgraded. I'll just drop CSS completely eventually:)
I don't trust freeware software, screensavers and so on. I know what they can do and what they do. Read this for example http://www.bluehatseo.com/how-to-make-a-100-per-day/ .

But there's an easy fix for the IE6 problem you experience: UPGRADE! IE7 is out there:)
#5 Garcia from Bolivia web
Posted on Saturday, 24 November, 2007
I know you can upgrade but I have kept IE6 to test my site on it. I got IE7-standalone if ever need IE7.
#6 netizen from Switzerland web
Posted on Sunday, 25 November, 2007
think about dyndns.com - you get domains there for free :)
#7 5ubliminal web
Posted on Monday, 26 November, 2007
Used them too for about a week when no-ip was down. But I like no-ip more.
I don't like the dyndns client that threatens you when you make an unnecessary update.
But now I moved over 90% of domains on local TLDs as it's better not to be seen from outside.

PS: There's nothing free in this world. You'll pay one way or the other.
5ubliminal's TellinYa.com SEM & SEO Blog © 2007 - All rights reserved unless mentioned otherwise .
Rendered On : [Monday, 08 February, 2010 - 22:18:40 GMT]   No Ajax / Flash Used Here
" I Own .dev Top Level Domain - TLD : 5ubliminal's TellinYa "
Close
Tellinya.com is relocating to blog.5ubliminal.com. This blog is no longer maintained and comments are no longer accepted / answered.