So we have DA setup and running. I am now seeing the problem Ken described in this video regarding duplicate content spread across domain + subdomains. http://archive.org/details/SharingContentAcrossMultipleSitesWithDomainAc...

When an article is published on 123.domain.com/article, as a super user, I can access it via domain.com/article (& vice versa). However Google will see a access deny page. Now that we have launched the subdomains, is this the right way to set things up so that users (& Google) who manually access an article in the "wrong" subdomain / domain, they will be redirected to the URL of the original article location? Do I change:

Do not rewrite URLs --> Rewrite all URLs to point to a single source
AND
Select Do Change Domain Name

Is that the right way to fix this issue? Wanted to check in before making this change since we have already launched the subdomains.

Thanks!

Comments

agentrickard’s picture

Google should, in fact, never see an "access denied" page. That's because Google should be crawling links, and all the links should point to a valid domain (e.g. the canonical URL of the content). Domain XMLSitemap module can help with this issue.

I also believe that Google won't index a 403 (access denied) page anyway. I've never seen evidence that it does.

So this should be a non-issue.

agentrickard’s picture

Sorry. For the above to work, you must either use Domain Source or, as you suggest, set "Rewrite all URLs to point to a single source."

I don't know what "Do Change Domain Name" means.

mealto’s picture

Thanks for the info Ken. Yes, Google should not index any of those Access Deny pages but we would like to keep things clean. Webmaster tools can throw up tens of thousands of pages of "errors" because of these pages. In fact, when we first setup *.domain.com, Google was actually indexing what I would call ghost URL's as *.domain.com would actually return something when it shouldn't. I have disabled *.domain.com and will add an A record for each new subdomain. So back to the question at hand.

We do have XMLSitemap setup but it was creating all subdomain articles with a domain.com path. No subdomains path were showing in the default (domain.com) final XML file. This sitemap is setup inside Google Webmaster and I was hoping we can keep using this withotu needing to submit a new sitemap for every new subdomain. This is one main reason why I am trying to clean things up a bit. For now, I have disabled subdomain articles from showing in any sitemaps. Google still indexed our subdomains articles pretty quickly so we will leave this for now.

So to keep original articles only in the domain or subdomain that they are created on / to redirect any "duplicate" paths to the orignal article, can I do this under Advanced Settings:

Change: Do not rewrite URL
to
Rewrite all URLs to point to a single source

Default Source Domain: Do Not Change Domain

We have already launched our subdomains, will this hurt anything?

agentrickard’s picture

You can fix the *.domain.com issue by setting an alias (using Domain Alias) to redirect to the primary domain.

Changing those settings should not hurt anything.

mealto’s picture

So does Domain Alias allow the redirecting to the "real" domain / subdomain that the articles are created on? When you say primary domain, this sounds like the Default Domain (as in 0)? If so, then this does not work, we need to have articles created on subdomains to "stay" there. like 123.domain.com/article. And if someone accessed that on www.domain.com/article, they should be directed to 123.domain.com/article.

Will have to try the settings later today. Thanks!

agentrickard’s picture

Domain Alias will let you alias any domain pattern to any of your registered domains.

In this case, I was recommending something like so:

Domains:

* example.com <= primary
* one.example.com
* two.example.com

Wildcard DNS is on so that *.example.com resolves.

For example.com, set an alias *.example.com and have it redirect to that domain. The alias will match anything other than one and two and issue a redirect to the "canonical domain". You can set multiple aliases for any registered domain.

The conceptual issue you are having, I think, is that there is no code in DA that issues node-specific redirects. It doesn't work that way. It rewrites the links to nodes. Domain Alias will redirect _all_ requests for a domain to its canonical domain.

Other people have written redirect code, which should be searchable in the queue. I don't support it.

mealto’s picture

ok quick update. Tried the Advanced Settings >> SEARCH ENGINE OPTIMIZATION. Problem still exists. I will have to look more into Domain Alias to see if it redirects ghost URL's to the actual canonical URL.

agentrickard’s picture

Nothing in DA will offer a per-node redirect, and it never will.

If by "ghost URL" you mean foo.example.com due to wildcard DNS, then yes, Domain Alias can solve that problem.

chriscalip’s picture

Issue summary: View changes

For anyone getting this SEO problem. A potential solution would be to implement drupal.org/project/metatag and at configuration page admin/config/search/metatags/config/node Add settings Canonical link with token [node:source-domain-node-url] provided by patch
https://www.drupal.org/node/2602822 .

This should resolve problem. Please update status if needed.

chriscalip’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.