Support Forums

SendGrid, DNS and apple-app-site-association

I’m trying to integrate SendGrid Universal Links with our app, but we are having trouble to configure it correctly.

We need this 2 rules for the subdomains:
subdomain.example.com/.well-known/apple-app-site-association -> example.com/.well-known/apple-app-site-association
subdomain.example.com/* -> SendGrid Site

We already have the second case working, but we didn’t find a way to set the first case.

Here is the sendgrid documentation related with that feature, but they don’t give a tutorial of how to set it with Netlify.

I don’t quite understand. What kind of rules are we talking about here? If it’s redirect, it’s fairly simple (at least I hope so). If it’s some other rules, what is it?

I tried to go through the documentation link you posted, but, all I can see is they asking you to create some files with some specific content in a specific folder, which doesn’t seem so difficult.

Just in case you’re talking about redirects, you can probably set it up in your netlify.toml file in your subdomain.example.com like this:

  from = "/.well-known/*"
  to = "example.com/.well-known/:splat"
  status = 200
  force = true

  from = "/*"
  to = "SendGrid Site"
  status = 200
  force = true

Does that work?

Thanks for your response! I am trying to test it, but it seems to be the way to solve it!

1 Like