Skip to content

Ability to have canonical root domain without redirect. #8250

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

Open
Daltz333 opened this issue Jun 9, 2021 · 9 comments
Open

Ability to have canonical root domain without redirect. #8250

Daltz333 opened this issue Jun 9, 2021 · 9 comments
Labels
Needed: design decision A core team decision is required

Comments

@Daltz333
Copy link

Daltz333 commented Jun 9, 2021

Details

  • Read the Docs project URL: frc-docs.readthedocs.io/
  • Build URL (if applicable): na
  • Read the Docs username (if applicable): daltz333

As of the deployment of #3231, the "Canonical" option under "Domains" no longer just sets the canonical meta data in non-root webpages, but also redirects the other pages to the "Root".

This comment from #3231 helps detail our use-case

It's definitely the case that canonical=True was poorly named or poorly applied when we originally wrote the implementation. Ideally canonical=True would function the way you're describing. From our current perspective, canonical=True only affects how the resolver determines the domain for the project and pieces like search and auth on the commercial side -- its effectively primary=True, not canonical=True.

We have a "primary" domain that we would prefer all search engines and SEO to use. This is https://docs.wpilib.org/. However, we also have a secondary domain https://frcdocs.wpi.edu/ that we direct users toward when the domain "https://docs.wpilib.org/" is blocked. It's often just domain blocked by over-aggressive school internet (this is our target demographic as we write docs for a high-school robotics competition).

Currently, https://frcdocs.wpi.edu/ redirects to https://docs.wpilib.org/. We'd like the ability to distinguish between "primary" domains and "have all sites redirect here" domains.

@stsewd
Copy link
Member

stsewd commented Jun 9, 2021

Hmm, I think if you uncheck the canonical option from the other domain the page will be served from that domain (not sure), if that works you can manually set the canonical meta tags with this option https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl

@Daltz333
Copy link
Author

Daltz333 commented Jun 9, 2021

I have unchecked the option, but it still redirects. It may take a bit for things to resolve (guessing). If it works, I'll follow that route to set the canonical meta tags.

@stsewd
Copy link
Member

stsewd commented Jun 9, 2021

Looks like now it redirects to the rtd.io domain :D

$ curl -I https://docs.wpilib.org                                                        
HTTP/2 302 
date: Wed, 09 Jun 2021 15:59:52 GMT
content-type: text/html; charset=utf-8
content-length: 0
location: https://frc-docs.readthedocs.io/en/stable/
```

@Daltz333
Copy link
Author

Redirecting to the RTD domain isn't the correct behavior either. We want all the domains to be equally accessible, but one domain "preferred"

@Daltz333
Copy link
Author

Hm. It looks like multiple domains is completely broken. This should probably get changed to "bug". It's either all domains redirect to readthedocs, or redirect to the canonical root.

@stsewd
Copy link
Member

stsewd commented Jun 14, 2021

It's either all domains redirect to readthedocs, or redirect to the canonical root.

Yeah, that's the current behavior, it was implemented in that way.

@Daltz333
Copy link
Author

What is the point in adding multiple domains besides redirecting?

@stsewd
Copy link
Member

stsewd commented Jun 14, 2021

I agree this shouldn't be the expected result, that's why I labeled this as design decision, I think this is mostly related to our resolver code always pointing the one domain.

@Daltz333
Copy link
Author

Gotcha. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

2 participants