Not sure if this is a pipe-dream, but I am interested in the URL rewriting capabilities (and DNS mapping) of a single-site WordPress install.

Typically in a WordPress MU setup, we'd use WordPress Mu Domain Mapping to map new sites/installs to a domain/CNAME.

What I'd be after is if it's possible to map a single-entity, like a user to a CNAME on the registrar.

For example, let's say we have a bunch of users in a single-site install. Ideally, these users would be accessed via YOURSITE.COM/johndoe (using get_user_by() which is an additional question). Then, on the registrar level, you setup a CNAME that has a value of us.OURDOMAIN.COM and point it to the IP address of the site. From there, WordPress is able to determine that us.OURDOMAIN.COM should load YOURSITE.COM/johndoe.

Any initial thoughts on this would be greatly appreciated. Thanks as always!

  • Zach... why is it always you asking such overly complicated questions? :P Maybe Christopher Davis article helps you to get things sorted.
    – kaiser
    Commented Dec 20, 2012 at 8:14
  • 1
    Ha I know right... who the heck do I think I am?! ;) Appreciate the article, I'll take a gander
    – Zach
    Commented Dec 21, 2012 at 12:17

1 Answer 1


I hope you are still interested in this question. I did a sub domain mapping to a custom post type using custom .htaccess setting.

RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^(.+)\.domain-name\.com$
RewriteRule ^$ /index.php?store=%1 [L]

Using this setting, each sub domain will map to the store custom post type. http://apple.domain-name.com will be equal to http://domain-name.com?store=apple or http://domain-name.com/store/apple/ if you are using the pretty permalink.

Note that you will need to modify the pager if you want to map the sub domain to category or custom taxonomy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.