3

I have one main domain name at site.com and I simply want to create blog.site.com using the same codebase and database. The only ways I see I can do that are by:

  • Using another install
  • Using a multi-site install
  • Using Domain Access

Among those 3 options, the most straightforward way to keep using one single codebase and database seems to be Domain Access but I wonder if it's not overkill for my use case?

This is with Drupal 7.

1
  • This really depends on your use case. If you describe your requirements, you will get more accurate suggestions.
    – Mike
    Sep 28, 2012 at 23:13

1 Answer 1

2

It really depends on what you need to do with the Blog vs. the regular site. For Flocknote, we decided to use www.flocknote.com/blog for the blog (so it would be easy to maintain as part of the rest of the website), but also have blog.flocknote.com redirect to the /blog URL (we set that up through a simple .htaccess rule, but you could also set up the redirect through your DNS provider).

If you really don't want the blog running within the same interface/site as the main site, but still want it running on Drupal, you can do that with one of the methods you mention. Just install another drupal site at blog.example.com using a database prefix (see Sharing a single database across multiple sites). Domain Access is a great solution if you plan on setting up more than a few subdomains on the same codebase, but it's overkill if you just want to run a blog. subdomain.

Or, if you want to set up another database, you could create a folder blog.example.com in the sites folder, point the blog subdomain/virtualhost to the same directory as the main site, and then use the separate database when installing Drupal.

3
  • Yes, that was exactly my concern. Definitely not worth it and I'll go with /blog and a visible DNS redirect from blog. to /blog - Thanks!
    – vanz
    Sep 29, 2012 at 7:02
  • Guys, quick unrelated question: what is the advantage of having a visible DNS redirect from blog. to /blog? why not just use the /blog version only? thanks.
    – Mario Awad
    Oct 2, 2012 at 20:04
  • To Mario: many people, when trying to get to a blog directly, will type in blog.example.com. The redirect catches those people. It's not a huge number, but I figure if someone's looking for it, why not give it to them (with a redirect). Same for planet., mail., etc. subdomains. Oct 2, 2012 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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