Mobile app version of vmapp.org
Login or Join
Miguel251

: How can I alias domains to subdomains? I have a main site with a bunch of subdomains created. Each subdomain is a blog and I want each blog to have its own domain name i.e. thisguy.com ->

@Miguel251

Posted in: #Subdomain

I have a main site with a bunch of subdomains created. Each subdomain is a blog and I want each blog to have its own domain name i.e.

thisguy.com -> blog1.mainsite.com
thatguy.com -> blog2.mainsite.com

I bought the new domains and I set up the CNAME records as above to alias them to the appropriate subdomains. However, I get my hosts "a domain is pointing to one of our servers but we don't know anything about it" landing page.

How can I set up these domains as aliases of my subdomains?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Miguel251

2 Comments

Sorted by latest first Latest Oldest Best

 

@Gail5422790

This is probably an issue with your Apache setup. You'll need to add

ServerAlias thisguy.com

To the blog1.mainsite.com vhost config. It goes in the same level as ServerName.

10% popularity Vote Up Vote Down


 

@Gretchen104

You need these entries in the .htaccess file at the root of your hosting (i.e. where mainsite.com goes)

RewriteCond %{HTTP_HOST} ^thisguy.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.thisguy.com$
RewriteRule ^/?$ "http://blog1.mainsite.com" [R=301,L]


and so on for thatguy.com and blog2.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme