Configuring subdomain for worker

Hi I am trying to configure a subdomain for one of my worker scripts but unable to figure it out :frowning:

I have a worker like https://worker1.xyz.workers.dev and it works perfectly fine.
I own a domain like bar.com and that domain is already configured in Cloudflare.
I want to configure something like https://foo.bar.com to point to the above worker i.e. when a user hits https://foo.bar.com it should invoke https://worker1.xyz.workers.dev
Note: I own both the domain and the worker script, so I have full control, it is just that I am unable to figure out what/how A or CNAME record needs to be configured to make it work.

Thanks in advance for a reply on this. (Screenshot with A or CNAME record will also be much appreciated)

UPDATE: I was able to resolve the issue by using the wrangler CLI https://developers.cloudflare.com/workers/quickstart/#publish-your-project

I suggest you add an :orange: “A” record for that subdomain and use a place holder IP address such as 192.0.2.1

A post was split to a new topic: 522 on site, pls help

Thanks. I was able to resolve my issue by using the wrangler CLI https://developers.cloudflare.com/workers/quickstart/#publish-your-project