How is a testing domain useful?

I've come across this article about Testing Domains and I don't understand why this is useful at all... Why does this differ from using localhost ? Can you give me a concrete example, because in the article it is not clear to me.

Is this different than using Apache's Virtual Host? Does it require less configuration?

UPDATE : I am not a server expert or anything like that, so please don't enter too much in the technical details. I am a web developper, and I am having problems testing multiple websites on my local machine. I feel that this would solve my problem, but I don't understand how I can use it to my benefit! Currently I use Apache's Virtual Host and it is doing well. I want to know how a testing domain like localtest.me is good/better than my current practice.


Solution 1:

Good question. I like that you're making sure that you understand the reasons. And the thread itself has more comment discussion about this too, including possible security concerns (and answers for them).

This isn't for everyone, but for people that do quick testing often and don't want to have to add a hosts record for each test, this a nifty way to do it. It's not a revolutionary replacement to hosts files or a loopback adapter, but it makes things just that much quicker for a quick test.

I can say that it's handy for me when I wear my administrator hat more than my developer hat. A developer will often just a small number of sites on a server and it doesn't change often. In that situation it's not a problem to take the effort to create a hosts entry or to use a corporate DNS entry.

But when I wear my administrators hat, it's often that I'll do a quick URL Rewrite test, or reply to someone in the forums, or prototype something where I only need the domain for 15 minutes. Then this solution is a great benefit to me by allowing me to ignore my hosts file which can easily get out of date with stale records which I forget if I still need or not.

Even as a dev if you often create quick test sites for new technologies, or testing new projects, then this can be helpful. Basically, if you work with different domain names often and you find yourself going to the hosts file, then this can help.

So your mileage will vary. If it doesn't make sense, then you're not working often in situations where it will help. If seeing this is like a light bulb turning on, then you do work often in situations which would benefit from this.

Solution 2:

That article mentions the reasons at the bottom. It will allow the use of name-based virtual hosts, you can more accurately test URL rewriting, and you can configure subdomains, which is useful when testing cookie behavior.