Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

canIncludeInSitemap - Enforce single domain? #53

Open
tractorcow opened this issue Aug 27, 2013 · 3 comments

Comments

@tractorcow
Copy link
Contributor

@tractorcow tractorcow commented Aug 27, 2013

I am investigating multiple-domain based localisation for a single site, and have been following the google sitemap guide at https://support.google.com/webmasters/answer/75712?hl=en

This is not so much a problem as a critique of the method followed by GoogleSitemapExtension::canIncludeInSitemap(). This code seems to explicitly exclude items that may be visible under a different hostname.

Why is it necessary to limit to a single domain if the specification doesn't prohibit it?

@wilr

This comment has been minimized.

Copy link
Owner

@wilr wilr commented Aug 28, 2013

The specification doesn't prohibit it but Google isn't such a fan of different URL's so the check was to prevent that as much as possible. https://support.google.com/webmasters/answer/35738?hl=en (URL Not Allowed).

@tractorcow

This comment has been minimized.

Copy link
Contributor Author

@tractorcow tractorcow commented Aug 28, 2013

Thanks @wilr for the prompt response.

It does seem a bit contradictory, but it seems from the documentation that this only becomes an issue if only a single domain is verified (www.example.com and not example.com), but it isn't an issue if two domains are each verified under the same account (www.example.com and www.example.co.uk).

So my next question is, can we raise this as an issue with the googlesitemap module? A potential solution would be to make the single-domain restriction configurable.

It could also be argued that alterCanIncludeInGoogleSitemap hook allows users to override this behaviour, but it's still abit awkward.

I feel a change in behaviour would be acceptable, but I don't feel strongly that it's urgent. Would you mind if I submit a PR with a suggested fix?

@wilr

This comment has been minimized.

Copy link
Owner

@wilr wilr commented Aug 29, 2013

Acceptable to me. PR as always, welcome with open arms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.