Skip to main content

Adding a custom domain or subdomain for your community

Published onJul 10, 2020
Adding a custom domain or subdomain for your community
·

With the PubPub Pro and Org plans, you can give your communities a custom domain.

Subdomains

To use a subdomain of a domain you already own (e.g., yoursubdomain.yourdomain.org), you’ll need to login to your registrar or DNS host for your domain and add a CNAME record with the following parameters (replacing yoursubdomain, and keeping custom-domain-1.pubpub.org as written for the target):

Record

Name

Target/Content

CNAME

yoursubdomain

custom-domain-1.pubpub.org

For instructions on how to set your domain’s CNAME records, visit the URL of your registrar or DNS host.

Once you’ve made these changes, send us an email letting us know so that we can finish the process on our end. In your email, please include:

  • The subdomain you’ll be using

  • The original PubPub URL to your community (e.g., community.pubpub.org)

  • A screenshot of your DNS setup from your registrar/DNS host showing your configuration

Top-Level Domains

Due to the nature of DNS, setting up a top-level domain (e.g., www.yourdomain.com) is a bit more complex. If you don’t already own your domain, we recommend buying it using a registrar that provides CNAME flattening, which will allow you to securely point your apex domain to PubPub. Our preferred registrar is Cloudflare, but you can also use registrars from this list.

If you already own your domain, and your registrar does not support CNAME flattening, we recommend you switch to using Cloudflare as your DNS host, which is simple and free. To make this change, signup for a Cloudflare account, add your name, and follow their instructions for pointing your domain’s name servers to Cloudflare.

Once you’re setup on Cloudflare (or another registrar/DNS host that supports CNAME flattening), you’ll need to set the following CNAME record, exactly as written (www as the name and custom-domain-1.pubpub.org as the target/content):

Record

Name

Target/Content

CNAME

www

custom-domain-1.pubpub.org

Cloudflare

In Cloudflare, CNAME flattening should automatically be turned on. You can verify this by clicking on the DNS tab and making sure the CNAME Flattening is set to “Flatten CNAME at Root.” But you’ll still need to redirect your apex domain (i.e. yourdomain.org) to point to the www CNAME you just setup (i.e. www.yourdomain.org). To do this, you’ll need to add a new Page Rule to Cloudflare, with the following settings (replacing yourdomain.org in both cases with the domain you want to use, but keeping the rest exactly as written):

If URL matches

The Settings Are…

Destination URL

Order

yourdomain.org/*

Forwarding URL / 301 - Permanent Redirect

https://www.yourdomain.org/$1

First

The page new rule should look like this (with your domain in place of yourdomain.org in both places):

Finally, you’ll need to check the SSL/TLS settings on Cloudflare to make sure that your domain is forwarding its certificate properly. It should be set to full.

Other Registrars/DNS Hosts

If you’re using another registrar or DNS host with CNAME flattening, you will likely need to add another DNS record. For example, at Namecheap you would add the following record (replacing www.yourdomain.org with your domain, including the www):

Record

Name

Target

ALIAS

@

www.yourdomain.org

Heroku provides CNAME flattening instructions for a number of compatible registrars/DNS hosts.

Once you’ve made these changes, send us an email letting us know so that we can finish the process on our end. In your email, please include:

  • The domain you’ll be using

  • The original PubPub URL to your community (e.g., community.pubpub.org)

  • A screenshot of your DNS setup from your registrar/DNS host showing your configuration

Getting Help

Once you setup your domain, it can take 24-48 hours for DNS servers across the world to update with your new information. So if your domain doesn’t work right away, that’s to be expected. Please wait 24 hours and try again. If your domain still isn’t working after 24 hours, please write to us letting us know. In your email, please include:

  • The domain or subdomain you’re trying to setup

  • The original PubPub URL to your community (e.g., community.pubpub.org)

  • The registrar or DNS host you’re using

  • A screenshot of your DNS setup from your registrar/DNS host showing your configuration

Comments
0
comment

No comments here