DNS Subdomain

August 24, 2013 6.9k views
The old shared hosted server had community.domain.com and the new droplet is www.domain1.com/community. The community is really just a subdirectory. DNS records domain.com and domain1.com are set for droplet. Can go to browser and type domain.com as well as domain1.com and get to domain1.com. Can also go www.domain1.com/community and the pages load fine. However ... I cannot go community.domain.com ... and get a browser error that the page will not load. Server not found I went to the DNS panel and added a CNAME community.domain.com. (the period is present). Did I miss a step? Domain1.com will point to domain.com ... (and does roll properly).
5 Answers
What are the two domain names?

I added an "A" record. Dunno what I'm really doing but think it is mostly working now.


But the roll over isn't quite right ...

In .htaccess I have

RewriteCond %{HTTP_HOST} ^community\.tuxreportsnetwork\.com
RewriteRule ^(.*)$ http://www.tuxreports.com/community/$1 [R=301]

The hope is everything in community.tuxreportsnetwork.com is rolled over to www.tuxreports.com/community ....

so I don't lose all the links from Google search.

But none of the links seem to redirect properly.


I'm not sure if this is all related .. or a really bad .htaccess attempt :)
Sorry - cannot edit above

Also noticed that any of the *.tuxreportsnetwork.com subdomains are not rolling to www.tuxreports.com

So this must be something I've done wrong on the DNS side too.
What's the contents of /etc/apache2/sites-enabled/?
DNS doesn't handle redirects, it only maps the domain name to your droplet('s IP address).

Please pastebin all of your virtualhost configs (http://pastebin.org)
Have another answer? Share your knowledge.