Skip to content

Instantly share code, notes, and snippets.

@rita3ko
Created February 2, 2017 15:52
Show Gist options
  • Save rita3ko/7e3d799ff3c6b2bc192b76f9d082946e to your computer and use it in GitHub Desktop.
Save rita3ko/7e3d799ff3c6b2bc192b76f9d082946e to your computer and use it in GitHub Desktop.
How to set up Cloudflare in front of Exposure

How to set up Cloudflare in front of Exposure

For anyone familiar with Cloudflare, you may have found it odd when you tried using a vanity domain on Exposure, and were notified a proxy in front of it would not work.

This guide will walk you through how to put Exposure behind Cloudflare’s proxy when using a custom domain.

  1. In the Expsoure dashboard, under Preferences → Site Preferences click on “Setup a Domain”, and choose whether you would like to use a subdomain, or the root domain (both will work for this guide)
  2. You will be given a DNS record:
    • If you chose subdomain, you will be presented with the following CNAME record to add to your DNS: domains.exposure.co
    • If you chose the root domain, you will be given an IP address (A record)
  3. Add the record to your Cloudflare DNS, however, be sure to “gray cloud”, or turn the proxy off initially. Exposure does a domain ownership check here, and will not find the proper records if you have the proxy turned on, as it will return a Cloudflare IP instead
  4. Click “Test Domain” in the Exposure dashboard. You should get a green checkmark for completing the test successfully
  5. In the Cloudflare dashboard, turn the proxy on by “orange cloud”-ing the record.
  6. That is it! You are all set!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment