How to add a DNS record just for worker routes?

Let’s say I have domain.com and www.domain.com CNAME records configured in CF pointing to some server.

Now I’d like to serve requests exclusively with workers from api.domain.com.

Is this possible or do I need to use something like domain.com/api/ instead for my routes?

But if it is possible what type of DNS record do I need to add to the domain?

The solution was to add a bogus A record pointing to 192.0.2.1.

Found this hack here: Setup Workers on Personal Domain

Thanks @Judge

Would be great if there were some docs about this!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.