Mobile app version of vmapp.org
Login or Join
XinRu657

: Link subdomain that is CNAME to SendGrid but with CloudFlare enabled ends up on main site We use Cloudflare, and Sendgrid for email. Via Sendgrid setup, we have added a DNS record: However,

@XinRu657

Posted in: #Cloudflare #Cname #Dns #Hsts

We use Cloudflare, and Sendgrid for email.

Via Sendgrid setup, we have added a DNS record:



However, this redirects to our main domain:
Example link.construct.net generated by SendGrid

If I disable CloudFlare routing (the orange cloud), the URL creates a security exception because HSTS is enabled for construct.net and all subdomains.

Am I correct in assuming link.construct.net should not end up on construct.net, and how can I resolve this so that the links resolve correctly?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @XinRu657

1 Comments

Sorted by latest first Latest Oldest Best

 

@Megan663

I believe that you are incorrect. An HTTP request to link.construct.net should redirect to construct.net.

Things are working the way they are supposed to work. With cloudflare enabled on your link subdomain, the DNS entries for it point to cloudflare. Cloudflare handles HTTPS termination like this. Cloudflare reverse proxies the request to sendgrid. Sendgrid sends a HTTP 302 temporary redirect to your main site with tracking parameters on the URL.

The redirect to your live site is only for tracking. The click hits sendgrids servers so that they know about it. They also use append utm tracking parameters onto the URL for your benefit in Google Analytics.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme