Sharing Content among two sites

Events happening in the community are now at Drupal community events on www.drupal.org.
guti's picture

I'm about to decide whether to use a multisite approch or simply copy my drupal installation to another site and make some changes to it there. The problem is that both sites share 80% of their content, but not all. When I edit some of the shared content, I want it to appear on both sites.
So is there a way to share parts of the content between two sites in a multisite setup? Something like that I can configure for each page whether it should be available on both domains or only on one. I know I can have completely separate or completely identical content, but is a mix possible?

Comments

Sharing Content among two sites

manuel_mra's picture

Hi:
You can use the Domain module instead of a multisite. You can set what contents should be showed to only one web site and you enter only once the content.

Domain Access module

seagle's picture

Allows you to run multiple sites off of one Drupal core. Every time you create a new node you assign it to one of the domains you've setup.

I can't say enough about this module.

Domain is an amazing module.

Lakeside's picture

Domain is an amazing module. It's a winner!

Someone--somewhere--should start a contest for best Drupal modules of the year--and include themes.

Pay attention to aliasing / path auto

deleteme_I_am_no_longer_needed's picture

In my experience (and I might have missed something), if you create an alias, the alias is only valid for the domain it was created in/for. I found some interesting problems when I tried to use
Path Auto on created content, but still have it viewable across multiple domains with the same path. YMMV, but it is something to consider. I tried to create a path auto that would be domain agnostic, but without success. If you do use path auto across domains, and are successful, please post some tips.

  • johnc

re: Pay attention to aliasing / path auto

seagle's picture

Correct, I found the same thing - you can only a unique alias once, i.e. '/about' can point to only one node no matter what the Domain is. This has forced me to have an '/about' page for one domain and a '/company/about' page for another... a minor setback in my opinion and could actually be helpful if the about page contains the same content for both domains.

What other downsides are

gmclelland's picture

What other downsides are there to the Domain module? Any other gotchas to look out for?

Thanks,
-Glenn

Chose your primary domain carefully

seagle's picture

Once you set your primary domain it is difficult to change down the line. This made my life a bit difficult because I have one domain that is much more active then the others. When creating new content, assigning blocks, permissions, users etc... it will often default to the primary domain unless otherwise defined. It's just another click to chose another domain but I wish I had set me primary domain differently... once you have thousands of nodes applied to multiple domains its a little nerve wracking to reassign the primary that's all. The other downside is if you break one site they're likely all to break but if you follow proper development/testing workflow this shouldn't be a problem, you just need to always be conscious of how pathauto, domain assignments, and modules are effecting each domain.

Thanks @seagle - Does the

gmclelland's picture

Thanks @seagle - Does the Domain Access created sites behave like completely separate sites? I'm mean can you have features(from the features module) turned on a one site and disabled on another, or does each site share the same configuration? I know you can change the theme.

I built a site using DA which

Garrett Albright's picture

I built a site using DA which currently has 15 or so subsites and a good deal of content. Since most of their sites have their own blocks, the blocks administration page has become a real monster, since it lists every block on every subsite (Domain Access itself filters out whether the given block appears for the given subsite or not) as being in its respective region. A similar thing happens with menu items, like for the aforementioned about page for every subsite. If every one of those pages has a menu item titled "About" in the "navigation" menu (for example), and you're logged in as the admin user that has access to every site, you'll see every single one of those "About" menu items. Good luck figuring out which one links to which site's "About" page!

Though unfortunate, these problems are a byproduct of how DA works.

SEO issues? Google dings for

Lakeside's picture

SEO issues?

Google dings for duplicate content. Since Domain allows two sites to share content Google will see it as duplicate content.

What is the best practice to prevent search engines from seeing shared content as duplicate content?

You could do something like

Garrett Albright's picture

You could do something like use the Canonical meta tag on the subsites to point to the copy on the main site, perhaps combined with the NOINDEX directive. The Meta tags module could likely help you with that.

Sharing content among two sites on a shared host

Guy Verville's picture

I have read a lot about multisites configurations and of the Domain Access Module. I'm still confused though because my client is on a shared hosting plan. This company has a corporate site and wants to implement microsites with their own domain name. There will be 5 microsites. Each microsite will read few nodes from the main database. The information must be present also on the corporate site.

The company website is on a shared server run by CPanel. I have access to this panel. So, my questions are:

  • Is this configuration is possible on a shared server (CPanel?)
  • If so, is Domain Access still the module to use? Or are there better solutions?
  • Will my client be better served on a dedicated server?

Guy I have a client running

greggmarshall's picture

Guy

I have a client running Domain Access on a shared hosting account doing something like what you are describing. They have a main site with their own branding (www.pfibenefits.com), then subdomains for affiliates with minor branding changes (logos and site name, e.g. iihb.pfibenefits.com). In theory we have the site set to be able to switch themes and do more extensive customization but the client hasn't gotten that far...

It took a couple of hours of experimenting to figure out how to set it up via cPanel (which I had made better notes).

Gregg

Help to decide

manuel_mra's picture

Hi:
If you want I can help you. Send me a message through my profile and then we can contact with Skype. I have tested multisite and Domain access modules and I had a lot of troubles to solve them but i have solved.

Manuel.

The corporate site must not appear on the URL.

Guy Verville's picture

Hello Gregg, thank you for the input. My problems here is that those domains won't be subdomains:

corporatesite.com
micrositeA.com
micrositeB.com
micrositeC.com

These micro sites will be installed on the same server, but the corporate site name must not appear anywhere in the URL. so micrositeA.corporatesite.com is totally excluded.

To make a story short: this is a wind farm company who makes different projects. Since each project are shared venture, they must appear «local» to the region. It's a political stuff ;-)

Pretty sure you can still do

greggmarshall's picture

Pretty sure you can still do this either multi-site or with Domain access. The additional URL's are "parked" via Cpanel and point to the base Drupal installation.

Looking at the project page for domain is shows:
example.com
my.example.com
thisexample.com <-- can use any domain string

One caveat is that some

Garrett Albright's picture

One caveat is that some shared hosting providers put limits on the number of domain names which can point to a single shared hosting account. There's no technical reason for them to do this; it's all in the hope that those who need to use more domain names than the limit will have to upgrade their account. These sorts of arbitrary limits have fallen out of fashion for the most part in the shared hosting world, but they might still be around, so I suggest you double-check the details of the account and make sure this won't be a problem in the future.

Thank you Gregg

Guy Verville's picture

I have not tried to only park the domain. Perhaps this is the way to do. Thanks!

Domain for actual domains, not just subdomains?

markwk's picture

I haven't started implementing (nor even looked at the code) with Domain Access yet, but just wanted to hear if you others had been successful with using separate domains? I.E. one site with domain access used for putting content on site123.com and site345.com, etc.?

It's possible - I built a

nonsie's picture

It's possible - I built a proof of concept site like this a while ago on Dreamhost which used 3 unique domain names (not subdomains). The only issue you will have is with cookies since you cannot share cookies across different domains.

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week