Mobile app version of vmapp.org
Login or Join
Shakeerah822

: How are web applications like Tumblr, WordPress.com and Blogspot able to create subdomains for users so fast? I am curious as to how web-applications are able to create sub-domains instantly for

@Shakeerah822

Posted in: #Dns #Htaccess #Subdomain #Tumblr #Wordpress

I am curious as to how web-applications are able to create sub-domains instantly for new users, for example, newuser.wordpress.com, or example.blogspot.com. If I need to create a new subdomain for a website it usually requires that I log onto the DNS control panel and create a subdomain manually.

I have read examples about wildcard DNS and subdomains but that doesn't seem to answer the question about how a logged in user can create their own subdomain. I imagine that using the .htaccess file one could rewrite the URL to load a subfolder associated with a specific user.

The solution that I would consider would be to use a service like Amazon Route 53 and create new subdomains using the API. I'm not sure if this would be considered a good solution.

Additionally Tumblr allows you to point your domain name to their IP address or 'domains.tumblr.com'. Does this mean Tumblr have their own Domain Name Servers to handle these requests?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Shakeerah822

1 Comments

Sorted by latest first Latest Oldest Best

 

@Bryan171

You're right that the trick is a wildcard DNS entry (indicated with asterisk) . Essentially it's a DNS entry that will match all subdomains that don't have a specific DNS entry. Then the "routing" happens on the application/website side. There is no actual DNS entry created for the subdomain, the reason that it finds a "match" when a DNS request is made, is because the DNS server is returning the IP address for the wildcard DNS entry for the domain.

To see an example of this in the real world, you can take a look at how Wordpress Multisite works with a wildcard DNS entry (note: many shared hosting providers will not allow you to create a wildcard DNS entry). Because the "routing" is happening at the application, not DNS level, it also allows you to map custom domains to sub-domains, if you like (like they offer at wordpress.com).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme