-
Notifications
You must be signed in to change notification settings - Fork 47
DNS
We have our own domain mdanalysis.org (registered with GoDaddy; @orbeckst is responsible for paying and administrating the domain). We set up a custom domain with GitHub pages so that our website is hosted as GH pages but appears under our domain, specifically as https://www.mdanalysis.org and https://mdanalysis.org. We use CloudFlare to secure the website and to improve performance (@orbeckst registered the account).
The nameservers are under Cloudflare's control (since 2017-09-28) so that we get a free SSL certificate and can have website and docs appear under SSL, i.e., https://mdanalysis.org (following the instructions from @gsempe: Build a fast, secured and free static site in less than 3 hours). DNSSEC was also enabled (by following the Cloudflare instructions for How to add a DS record to GoDaddy).
There are other implications due to using CloudFlare: CloudFlare acts as reverse proxy and all traffic to our sites is routed through their network (which likely screws up analytics unless one restores original visitor IPs). It provides caching and even static cache pages when the downstream resources are not accessible. It also provides some firewalling and protection against DDoS attacks (although this is not really our concern because we do not host any of our servers ourselves).
This has the additional effect that GH pages in repositories under MDAnalysis will also show up under our domain. Any tool that has its own repo (such as RotamerConvolveMD) can also have it's own docs such as http://www.mdanalysis.org/RotamerConvolveMD (one just has to craft the gh-pages branch carefully so that the index.html file appears at the top of the repo).
MDAnalysis has its documentation at two URLs (as of June 14 2020):
| URL | Repo name | Description |
|---|---|---|
| docs.mdanalysis.org | mdanalysis | Docs for all releases of MDAnalysis (default: stable) |
| userguide.mdanalysis.org | UserGuide | User guide (default: stable) |
These used to be subdirectories (e.g., mdanalysis.org/docs but we moved them to subdomains). With doc versioning, the URLs look like this:
| URL | Repo name | Description |
|---|---|---|
| docs.mdanalysis.org/$version | mdanalysis | Docs for all versions of MDAnalysis |
| userguide.mdanalysis.org/$version | UserGuide | User guide |
There also exist specific redirects
| URL | Repo name | Description |
|---|---|---|
| docs.mdanalysis.org/dev | mdanalysis | Docs for the latest development version of MDAnalysis |
| docs.mdanalysis.org/stable | mdanalysis | Docs for the latest stable release version of MDAnalysis |
| docs.mdanalysis.org/latest | mdanalysis | same as stable |
GitHub's existing <organisation_name>/<repo_name> URL framework means that https://mdanalysis.org/mdanalysis redirects to https://docs.mdanalysis.org, and likewise for the user guide. However, the most sensible destination for https://docs.mdanalysis.org/ is to redirect to https://docs.mdanalysis.org/latest (i.e. the latest release). This poses a problem for the legacy urls of https://mdanalysis.org/docs and https://mdanalysis.org/mdanalysis; https://mdanalysis.org/docs no longer needs to exist if we implement versioned documentation, and https://mdanalysis.org/mdanalysis will redirect to the latest release docs via https://docs.mdanalysis.org/ .
We can use Cloudflare Pagerules redirecting to forward a specific subdirectory to a specific subdomain, and vice versa. For example, https://docs.mdanalysis.org used to forward to https://www.mdanalysis.org/docs.
However, on the free plan we only have 3 free rules available. (+5 rules is $5/month!)
| subdomain | url | target | target url | real host |
|---|---|---|---|---|
| docs | https://www.mdanalysis.org/docs/* | release docs | https://docs.mdanalysis.org/1.0.0/* |
GitHub (CloudFlare PageRule) (added October 2020 to remove the need for the docs repository. note 1.0.0 is hardcoded into the PageRule to avoid multiple redirects) |
| workshop | https://workshop.mdanalysis.org | Workshop/Hackathon 2018 | https://www.mdanalysis.org/WorkshopHackathon2018/ |
GitHub (CloudFlare page rule) can be removed |
| www | https://www.mdanalysis.org | home page | https://mdanalysis.github.io |
GitHub (CNAME) |
|
https://mdanalysis.org | home page | https://mdanalysis.github.io |
GitHub (CloudFlare page rule) |
And of course, https://mdanalysis.org and https://www.mdanalysis.org are the MDAnalysis GitHub-Pages.
As mentioned above, it would be convenient for https://docs.mdanalysis.org to redirect to https://docs.mdanalysis.org/latest . We could do this with a PageRule but it is likely much cheaper to keep an index.html in the mdanalysis repo (gh-pages branch) that consists of:
<!DOCTYPE html>
<meta charset="utf-8">
<title>Redirecting to https://docs.mdanalysis.org/latest
<meta http-equiv="refresh" content="0; URL=https://docs.mdanalysis.org/latest">
<link rel="canonical" href="https://docs.mdanalysis.org/latest">We can apply this to other URLs as well; e.g. this main website can keep docs.html and mdanalysis.html stubs that perform similar redirects.