You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/alternate_domains.rst
+46-13Lines changed: 46 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Read the Docs supports a number of custom domains for your convenience. Shorter
6
6
Subdomain Support
7
7
------------------
8
8
9
-
Every project has a subdomain that is available to serve its documentation. If you go to <slug>.readthedocs.io, it should show you the latest version of documentation. A good example is http://pip.readthedocs.io
9
+
Every project has a subdomain that is available to serve its documentation. If you go to <slug>.readthedocs.io, it should show you the latest version of documentation. A good example is https://pip.readthedocs.io
10
10
11
11
.. note:: If you have an old project that has an underscore (_) in the name, it will use a subdomain with a hyphen (-).
12
12
`RFC 1035 <http://tools.ietf.org/html/rfc1035>`_ has more information on valid subdomains.
@@ -23,7 +23,7 @@ This requires two steps:
23
23
.. note:: The ``Domain`` that should be used is the actual subdomain that you want your docs served on.
24
24
Generally it will be `docs.projectname.org`.
25
25
26
-
Using pip as an example, http://www.pip-installer.org resolves, but is hosted on our infrastructure.
26
+
Using pip as an example, https://pip.pypa.io resolves, but is hosted on our infrastructure.
27
27
28
28
As another example, fabric's dig record looks like this::
29
29
@@ -32,22 +32,55 @@ As another example, fabric's dig record looks like this::
32
32
;; ANSWER SECTION:
33
33
docs.fabfile.org. 7200 IN CNAME readthedocs.io.
34
34
35
-
.. note:: We used to map your projects documentation from the subdomain that you pointed your CNAME to.
36
-
This wasn't workable at scale,
37
-
and now we require you to set the domain you want to resolve on your project.
35
+
.. note::
36
+
37
+
We used to map your projects documentation from the subdomain that you pointed your CNAME to.
38
+
This wasn't workable at scale,
39
+
and now we require you to set the domain you want to resolve on your project.
40
+
38
41
39
42
CNAME SSL
40
43
---------
41
44
42
-
We don't support SSL for CNAMEs on our side,
43
-
but you can enable support if you have your own server.
44
-
SSL requires having a secret key,
45
-
and if we hosted the key for you,
46
-
it would no longer be secret.
45
+
By default, when you setup a custom domain to host documentation at Read the Docs,
46
+
we will attempt to provision a domain validated SSL certificate for the domain.
47
+
This service is generously provided by Cloudflare.
48
+
49
+
.. note::
50
+
51
+
Some older setups configured a CNAME record pointing to ``readthedocs.org``
52
+
or another variation. While these continue to resolve,
53
+
they do not yet allow us to acquire SSL certificates for those domains.
54
+
Simply point the CNAME to ``readthedocs.io``.
55
+
56
+
.. important::
57
+
58
+
Due to a limitation, a domain cannot be proxied on Cloudflare
59
+
to another Cloudflare account that also proxies.
60
+
This results in a "CNAME Cross-User Banned" error.
61
+
In order to do SSL termination, we must proxy this connection.
62
+
If you don't want us to do SSL termination for your domain --
63
+
**which means you are responsible for the SSL certificate** --
64
+
then set your CNAME to ``cloudflare-to-cloudflare.readthedocs.io``
If you would prefer to do your own SSL termination
76
+
on a server you own and control,
77
+
you can do that although the setup is a bit more complex.
47
78
48
-
To enable SSL:
79
+
Broadly, the steps are:
49
80
50
81
* Have a server listening on 443 that you control
82
+
* Procure an SSL certificate for your domain and provision it
83
+
and the private key on your server.
51
84
* Add a domain that you wish to point at Read the Docs
52
85
* Enable proxying to us, with a custom ``X-RTD-SLUG`` header
53
86
@@ -57,7 +90,7 @@ An example nginx configuration for pip would look like:
57
90
:emphasize-lines: 9
58
91
59
92
server {
60
-
server_name docs.pip-installer.org;
93
+
server_name pip.pypa.io;
61
94
location / {
62
95
proxy_pass https://pip.readthedocs.io:443;
63
96
proxy_set_header Host $http_host;
@@ -73,4 +106,4 @@ An example nginx configuration for pip would look like:
73
106
rtfd.org
74
107
---------
75
108
76
-
You can also use `rtfd.io` and `rtfd.org` for short URLs for Read the Docs. For example, http://pip.rtfd.io redirects to its documentation page. Any use of `rtfd.io` or `rtfd.org` will simply be redirected to `readthedocs.io`.
109
+
You can also use `rtfd.io` and `rtfd.org` for short URLs for Read the Docs. For example, https://pip.rtfd.io redirects to its documentation page. Any use of `rtfd.io` or `rtfd.org` will simply be redirected to `readthedocs.io`.
0 commit comments