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.
- 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)
- 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)
- 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
- Click “Test Domain” in the Exposure dashboard. You should get a green checkmark for completing the test successfully
- In the Cloudflare dashboard, turn the proxy on by “orange cloud”-ing the record.
- That is it! You are all set!