-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Docs: update custom domains docs #9266
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
Conversation
e7d4772
to
e458023
Compare
Multiple documentation sites as sub-folders of a domain | ||
------------------------------------------------------- | ||
|
||
You may host multiple documentation repositories as **sub-folders of a single domain**. | ||
For example, ``docs.example.org/projects/repo1`` and ``docs.example.org/projects/repo2``. | ||
This is `a way to boost the SEO of your website <https://moz.com/blog/subdomains-vs-subfolders-rel-canonical-vs-301-how-to-structure-links-optimally-for-seo-whiteboard-friday>`_. | ||
|
||
See :doc:`subprojects` for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this doesn't make much sense to be here, but I don't know where else to put it, maybe we should put this on the features pages as the description for subprojects?
I think this change makes the review very hard because it's not detected as a rename and there is no diff see the changes. Is it possible to do this in a different commit? |
I also prefer to isolate changes like this in individual commits -- moving files, linting, etc |
e458023
to
0d630c6
Compare
This has two commits now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This upgrade is great! We are mentioning all the news regarding custom domains and cleaning up the docs.
I think this PR does a great job on the technical side, but may not be too aligned with the marketing/narrative content we wanted to add to these feature pages. Is this going to be done in a different PR?
That said, I left some comments/suggestions to make some sections clearer from a user's perspective.
docs/user/canonical-urls.rst
Outdated
If you are using :doc:`Sphinx </intro/getting-started-with-sphinx>`, | ||
Read the Docs will set the value of the html_baseurl_ setting (if isn't already set) to your canonical domain. | ||
|
||
.. _html_baseurl: https://www.sphinx-doc.org/page/usage/configuration.html#confval-html_baseurl | ||
|
||
For :doc:`MkDocs </intro/getting-started-with-mkdocs>` this isn't done automatically, | ||
but you can use the site_url_ setting. | ||
|
||
.. _site_url: https://www.mkdocs.org/user-guide/configuration/#site_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should probably be subsections with instead just 2 paragraph. Also, it could mention that this does not work with build.commands
maybe...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to split this into subsections, we need to add the description about the link tag and the warning to both, mkdocs and sphinx, we could move mkdocs paragraph about not being supported to a note instead
Enabling | ||
++++++++ | ||
|
||
You can set the canonical URL for your project in the Project Admin page. | ||
Check your :guilabel:`Admin` > :guilabel:`Domains` page for the domains that we know about. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we lost this subsection in the refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's as a step when creating the domain https://github.com/readthedocs/readthedocs.org/pull/9266/files#diff-938211973d90543e901c5445def567dddb0542430d329c86285f88acf281e169R20
I'm not sure what you mean with that, in the original issue there isn't a description about that either. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial review here. I have lots more feedback, would it be useful for me to just push up edits directly?
docs/user/canonical-urls.rst
Outdated
They are mainly used by search engines to link users to the correct | ||
version and domain of your documentation. | ||
|
||
.. _Canonical URLs: https://datatracker.ietf.org/doc/html/rfc6596 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We definitely don't want to link to this. Perhaps https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls?
docs/user/canonical-urls.rst
Outdated
For example, if you have a project named ``docs`` | ||
with a custom domain ``https://docs.example.com``. | ||
A search engine like Google will index both domains, ``http://docs.readthedocs.io`` and | ||
``https://docs.example.com``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, if you have a project named ``docs`` | |
with a custom domain ``https://docs.example.com``. | |
A search engine like Google will index both domains, ``http://docs.readthedocs.io`` and | |
``https://docs.example.com``. | |
For example, if you have a project named ``example-docs`` | |
with a custom domain ``https://docs.example.com``. | |
A search engine like Google will index both domains, ``http://example-docs.readthedocs.io`` and | |
``https://docs.example.com``. |
docs
as an example is confusing, since it's also the same URL we're hosting the content. Examples should always use example
in them.
docs/user/canonical-urls.rst
Outdated
|
||
But you'll want to use ``https://docs.example.com`` as your canonical domain, | ||
this means that when Google indexes a page like ``https://docs.readthedocs.io/en/9.0/``, | ||
it will know that it should really point at ``https://docs.example.com/en/latest/``. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels really confusing to a user... I feel like we aren't explaining why this is useful here.
docs/user/canonical-urls.rst
Outdated
|
||
.. code-block:: html | ||
|
||
<link rel="canonical" href="http://docs.fabfile.org/en/2.4/" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use the example domain from above.
|
||
If you change your default version or canonical domain, | ||
you'll need to re-build all your versions in order to update their | ||
canonical URL to the new one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is bad UX :( but not much we can do but document it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning applies for both, mkdocs and sphinx, we should move it at the parent section maybe
docs/user/custom-domains.rst
Outdated
|
||
By default, your documentation is served from a Read the Docs :ref:`subdomain <hosting:subdomain support>` using the project's slug: | ||
``<slug>.readthedocs.io`` or ``<slug>.readthedocs-hosted.com`` for |com_brand|. | ||
For example if you import your project as ``docs``, it will be served from ``https://docs.readthedocs.io``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example if you import your project as ``docs``, it will be served from ``https://docs.readthedocs.io``. | |
For example if you import your project as ``example-docs``, it will be served from ``https://example-docs.readthedocs.io``. |
docs/user/custom-domains.rst
Outdated
this can cause a delay in validating because there is an exponential back-off in validation. | ||
Loading the domain details in the Read the Docs dashboard and saving the domain again will force a revalidation. | ||
|
||
Certificate authority authorization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just remove this entire section. It isn't needed anymore.
@ericholscher sure, I have pushed some improvements from the review already. |
I've just pushed up a bunch of edits in ddcab9d. With these I'm 👍 on merging, so just need someone else to review. |
This is not a perfect solution for this problem, | ||
but generally people finding outdated documentation is a big problem, | ||
and this is one of the suggested ways to solve it from search engines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels redundant, and/or isn't adding much for the reader. Is there a specific reason worth mentioning why it isn't a great solution perhaps? If not, maybe worth skipping this sentence
This is not a perfect solution for this problem, | |
but generally people finding outdated documentation is a big problem, | |
and this is one of the suggested ways to solve it from search engines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to justify why we're doing this. Users will likely be confused why this is happening if we don't explain the tradeoffs between not using canonical versions and indexing every version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, but the sentence before describes the problem better. This sentences mostly distills down to "this is one imperfect solution to the problem we just outlined", and so sounds redundant, and isn't confident.
I'm suggesting either expanding on the problem/solution or dropping this sentence. Something like this expands on both:
This is not a perfect solution for this problem, | |
but generally people finding outdated documentation is a big problem, | |
and this is one of the suggested ways to solve it from search engines. | |
Linking to outdated documentation is confusing for your readers, | |
but this can be avoided by telling search engines exactly where to find your documentation. |
@@ -25,6 +25,9 @@ Glossary | |||
project page | |||
Another name for :term:`project home`. | |||
|
|||
slug | |||
The lower case & hyphenated name of your project that is used in URL's. You can find this on the project :guilabel:`Overview` section of your documentation under ``Project Slug``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a term I'd love to phase out eventually
docs/user/custom-domains.rst
Outdated
this service is provided by Cloudflare. | ||
The SSL certificate issuance can take about one hour, | ||
you can see the status of the certificate on the domain page in your project. | ||
managed by Cloudflare. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can link to https://www.cloudflare.com/ here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericholscher not sure if you missed this or not --but there is no reaction: 👍🏼 or 👎🏼 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really care. We can link to them, or not. 🤷 Definitely doesn't seem like a blocker though.
For both |org_brand| and |com_brand|, HSTS and other custom headers can be set upon request. | ||
|
||
We always return the HSTS header with a max-age of at least one year | ||
for our own domains including ``*.readthedocs.io``, ``*.readthedocs-hosted.com``, ``readthedocs.org`` and ``readthedocs.com``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we include HSTS on readthedocs.build
for a particular reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing we just haven't done it yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, addressed review feedback. 👍
For both |org_brand| and |com_brand|, HSTS and other custom headers can be set upon request. | ||
|
||
We always return the HSTS header with a max-age of at least one year | ||
for our own domains including ``*.readthedocs.io``, ``*.readthedocs-hosted.com``, ``readthedocs.org`` and ``readthedocs.com``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing we just haven't done it yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! There is some checks failing, tho.
docs/user/custom-domains.rst
Outdated
this service is provided by Cloudflare. | ||
The SSL certificate issuance can take about one hour, | ||
you can see the status of the certificate on the domain page in your project. | ||
managed by Cloudflare. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericholscher not sure if you missed this or not --but there is no reaction: 👍🏼 or 👎🏼 ?
This includes: * defining slugs * Clarifying removing domains * More selling of our custom header features
Co-authored-by: Anthony <[email protected]> Co-authored-by: Manuel Kaufmann <[email protected]>
082f513
to
4415907
Compare
Changes:
ref #9258