Using one wordpress site for all subdomains

I want to use WordPress to manage all sub-domains but not as a multi-site. So in essence all subdomains will show the same wordpress site (*.domain.com -> shows same wordpress site).

Is that possible and how?

Related posts

Leave a Reply

3 comments

  1. I think you can do that in your cPanel, when you create each of these subdomains use the main domain document root for them. In this way you will have all the subdomains use the same main folder.

  2. You can use your .htaccess file to redirect subdomains to your main wordpress site.

    RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
    RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
    

    this will make any http://www.example.com redirect to example.com

    RewriteCond %{HTTP_HOST} ^othersubdomain.example.com$ [NC]
    RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
    

    will make othersubdomain.example.com redirect to http://example.com. In this fashion, you can cover the subdomains you expect your users to visit.

    Is that what you want? All of them will be the exact same website, which seems like what you want.