Skip to content

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

Merged
merged 11 commits into from
Jun 13, 2022
Merged

Docs: update custom domains docs #9266

merged 11 commits into from
Jun 13, 2022

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented May 24, 2022

Changes:

  • Rename the page from custom_domains.rst -> custom-domain.rst (I'll create a redirect when this is approved)
  • Describe canonical urls in their own page (since they work even if you don't add a custom domain)
  • The creation of a custom domain for .com and .org are almost the same, so no more tabs
  • I have updated the FAQ about CAA records to mention that we already set the correct ones
  • Describe default subdomains on the hosting.rst page.\
  • Removed the part of title about "white labeling", there isn't any content about that in that page, and if any we should just add another page about it.

ref #9258

@stsewd stsewd force-pushed the update-custom-domain-docs branch 5 times, most recently from e7d4772 to e458023 Compare May 25, 2022 18:41
Comment on lines +73 to +93
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.
Copy link
Member Author

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?

@stsewd stsewd marked this pull request as ready for review May 25, 2022 18:47
@stsewd stsewd requested a review from a team as a code owner May 25, 2022 18:47
@humitos
Copy link
Member

humitos commented May 26, 2022

Rename the page from custom_domains.rst -> custom-domain.rst (I'll create a redirect when this is approved)

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?

@agjohnson
Copy link
Contributor

I also prefer to isolate changes like this in individual commits -- moving files, linting, etc

@stsewd stsewd force-pushed the update-custom-domain-docs branch from e458023 to 0d630c6 Compare May 26, 2022 21:19
@stsewd
Copy link
Member Author

stsewd commented May 26, 2022

This has two commits now

Copy link
Member

@humitos humitos left a 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.

Comment on lines 32 to 65
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
Copy link
Member

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...

Copy link
Member Author

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

Comment on lines -173 to -177
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.
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stsewd
Copy link
Member Author

stsewd commented May 31, 2022

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?

I'm not sure what you mean with that, in the original issue there isn't a description about that either.

Copy link
Member

@ericholscher ericholscher left a 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?

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 22 to 25
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``.
Copy link
Member

@ericholscher ericholscher May 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Comment on lines 26 to 39

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/``.

Copy link
Member

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.


.. code-block:: html

<link rel="canonical" href="http://docs.fabfile.org/en/2.4/" />
Copy link
Member

@ericholscher ericholscher May 31, 2022

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.
Copy link
Member

@ericholscher ericholscher May 31, 2022

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.

Copy link
Member Author

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


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``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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``.

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
Copy link
Member

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.

@stsewd
Copy link
Member Author

stsewd commented Jun 2, 2022

would it be useful for me to just push up edits directly?

@ericholscher sure, I have pushed some improvements from the review already.

@ericholscher
Copy link
Member

I've just pushed up a bunch of edits in ddcab9d. With these I'm 👍 on merging, so just need someone else to review.

Comment on lines +11 to +13
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.
Copy link
Contributor

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

Suggested change
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.

Copy link
Member

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.

Copy link
Contributor

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:

Suggested change
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``.
Copy link
Contributor

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

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.
Copy link
Member

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

Copy link
Member

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 👎🏼 ?

Copy link
Member

@ericholscher ericholscher Jun 13, 2022

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``.
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

@ericholscher ericholscher left a 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``.
Copy link
Member

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.

Copy link
Member

@humitos humitos left a 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.

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.
Copy link
Member

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 👎🏼 ?

@ericholscher ericholscher force-pushed the update-custom-domain-docs branch from 082f513 to 4415907 Compare June 13, 2022 18:30
@ericholscher ericholscher merged commit 79178c6 into main Jun 13, 2022
@ericholscher ericholscher deleted the update-custom-domain-docs branch June 13, 2022 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants