Home > Programming, Servers & Scripts >

MUST USE: How to instantly have an unlimited no. of subdomains (3)


10-12-2016 08:16 AM #1 erikgyepes (Moderator)
MUST USE: How to instantly have an unlimited no. of subdomains

I always seems to have my best ideas in the shower.

Last year it was an angle for a PIN submit offer that I eventually forgot about.

After weeks it came back to my head, so I immediately launched it and it became one of my top campaigns that year.

Recently I had a shower again and this time I was thinking about saving time creating subdomains on the fly.

WHY WE USE SUBDOMAINS?

So what's the reason we use subdomains in the first place?



PROBLEM / CURRENT SITUATION

What may be the problem here?

Let's see what's the workflow when creating a new subdomains for most of us:

  1. think of a subdomain
  2. go to domain registrar (eg. NameCheap)
  3. create CNAME DNS record with subdomain
  4. wait for DNS propagation around the world (btw I use whatsmydns.net for checking)
  5. use it in your tracker
  6. repeat the above with a new subdomain


It works. But it's not effective and definitely not flexible.

What if there is a simple solution that you setup once and forget about it?

SOLUTION:

The solution is super simple and I believe many tech savvy guys are already doing this.

Did you know that CNAME DNS records supports WILDCARDS?

WTF is wildcard DNS record?

A wildcard DNS record is a record in a DNS zone that will match requests for non-existent domain names. A wildcard DNS record is specified by using a "*" as the leftmost label (part) of a domain name, e.g. *.example.com. The exact rules for when a wild card will match are specified in RFC 1034, but the rules are neither intuitive nor clearly specified. This has resulted in incompatible implementations and unexpected results when they are used. ~ Read more about Wildcard DNS record on Wikipedia
This means you can setup a wildcard DNS record once and you are done!

After this your process will change to:

  1. think of a subdomain
  2. use it in your tracker


HOW TO SET IT UP?

The process is same as always when you setup a new CNAME. The only difference is that instead of setting up a fixed subdomain name you enter * (asterix).

Here is how it's done if you are using NameCheap:

You just navigate to your domain -> Advanced DNS and add a new or replace the current CNAME record as follows (set your host to *):



After this simple step is done you can get creative and setup new subdomains on the fly!

From now any-new-shower-idea.domain.com will work instantly!

Hope it helped, I'm now back to have some shower again..

Erik


10-12-2016 08:36 AM #2 matuloo (Legendary Moderator)

Thanks for posting this Erik, I'm sure many people didn't know about the wildcards option.

Some time ago, this used to work wonders in terms of SEO too, putting keywords in the subdomains was almost like having the keyword in the domain itself. I think this factor is gone for the most part at least in google, but it might still help a bit when used where it makes sense.


10-13-2016 10:44 AM #3 erikgyepes (Moderator)

Yes, it's a simple but powerful feature.

And yeah, I believe there are a lot more of creative uses of it besides these 2 that we mentioned here.


Home > Programming, Servers & Scripts >