OneUptime / oneuptime

OneUptime is the complete open-source observability platform.
https://oneuptime.com
Apache License 2.0
4.84k stars 227 forks source link

CNAME Cannot be Verified #1664

Open rezytijo opened 2 months ago

rezytijo commented 2 months ago

Describe the bug CNAME Record on OneUptime cannot be Verified

To Reproduce Steps to reproduce the behavior:

  1. Go to Project Setting add Custom Domain and TXT Record on DNS Server to verify the domain, for this step i dont see any issue
  2. Go to Status Pages >> Choose i status page add Custom Subdomain
  3. Create CNAME Record in DNS and wait maybe 5 upto 3 days and try to Verify the custom subdomain

Screenshots image

Deployment Type self hosted (7.0.3010)

Additional context Maybe because of wrong config.env this example of my config.env

HOST=oneuptime.mydomain.com
# If you would like to attach status page to custom domains use this setting.
# For example, lets say you would like the status page to be hosted on status.yourcompany.com, then 
# 1. Create a A record in your DNS provider with the name "oneuptime.yourcompany.com" and value to Public IP of the server oneuptime is deployed on.
# 2. Set the STATUS_PAGE_CNAME_RECORD to "oneuptime.yourcompany.com"
# 3. Create CNAME record in your DNS provider with the name "status.yourcompany.com" and value "oneuptime.yourcompany.com"
STATUS_PAGE_CNAME_RECORD=oneuptime.mydomain.com
rezytijo commented 2 months ago

Looks like I found the source of the problem, I happened to use Cloudflared to make OneUptime accessible from the internet, the flow is like this:

Server --> Cloudflared Create subdomain ---> Primary DNS Record is CNAME to cloudflared subdomain

I don't understand how OneUptime reads CNAME records but it looks like OneUptime reads up to Cloudflared Subdomains

If we use Google Admin Toolbox, they can read our CNAME Record correctly image

but if i use nslookup command look like this image