-
Notifications
You must be signed in to change notification settings - Fork 41
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 copies and redirects
URL | Repo name | Description |
---|---|---|
docs.mdanalysis.org/dev | mdanalysis | Docs for the latest development version of MDAnalysis |
docs.mdanalysis.org/stable | mdanalysis | Copy of docs for the latest stable release version of MDAnalysis |
docs.mdanalysis.org/latest | mdanalysis | This redirects (is not a copy) to the most recent release |
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/stable (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!) Therefore, we use the Pagerules wisely:
- One is needed to maintain the legacy URL https://www.mdanalysis.org/docs/ to always point to the latest release docs.
- One is needed to make the apex domain URL https://mdanalysis.org work.
- The last free Pagerule can be used as needed (e.g. for temporary nice workshop URLs).
subdomain | url | target url | notes for the Pagerule/Forward |
---|---|---|---|
docs | https://www.mdanalysis.org/docs/* | https://docs.mdanalysis.org/stable/* |
release docs: GitHub (CloudFlare PageRule) (added October 2020 to remove the need for the docs repository.) |
|
https://mdanalysis.org | https://mdanalysis.github.io |
home page: GitHub (CloudFlare page rule) |
workshop | https://workshop.mdanalysis.org | https://www.mdanalysis.org/WorkshopHackathon2018/ |
Workshop/Hackathon 2018 : GitHub (CloudFlare page rule) can be removed/reused as needed |
www | https://www.mdanalysis.org | https://mdanalysis.github.io |
home page: GitHub (CNAME) (works automatically with the CNAME file) |
As mentioned above, it would be convenient for https://docs.mdanalysis.org to redirect to https://docs.mdanalysis.org/stable . We currently 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/stable
<meta http-equiv="refresh" content="0; URL=https://docs.mdanalysis.org/stable">
<link rel="canonical" href="https://docs.mdanalysis.org/stable">
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.