Trying to serve second static site as subdomain of primary site [resolved]

Long story short, I am hosting a couple of static sites generated with Hugo using Workers. Everything has been great so far. But now I find myself needing to add a second static site as a subdomain of one of my existing static sites.

DNS is managed via Cloudflare, which is also the domain registrar for this particular domain.

So we have staticsite.com which has been live for about a year now.
I am now wanting to add sub.staticsite.com as a separate site using a separate worker.

My wrangler.toml files are set as follows

Primary Site

name = "staticsite_com"
type = "webpack"
account_id = ""
workers_dev = false
route = "https://staticsite.com/*"
zone_id = ""

[site]
bucket = "./public"
entry-point = "workers-site"

Subdomain

name = "sub_staticsite_com"
type = "webpack"
account_id = ""
workers_dev = false
route = "https://sub.staticsite.com/*"
zone_id = ""

[site]
bucket = "./public"
entry-point = "workers-site"

I have 3 A records on the site.

www                      1.2.3.4                    proxied
staticsite.com           1.2.3.4                    proxied
sub                      1.2.3.4                    proxied

I assumed that this would all work and I would get this new site available on the subdomain, but I am just getting a “Page not Found” error from my browser.

Any chance anyone can point me in the right direction?

Apparently I get to eat crow. The issue was my local network. Everything worked as I expected. Excuse me…

2 Likes