Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

RushVan's avatar

Pointing a subdomain to my app

I am trying to point subdomain.example.com to a Laravel app on Forge. I created the subdomain record and pointed it within the registrar. If I check the dns on that (whatsmydns.net), I get the anticipated IP of the app. On that IP (my Forge instance) the app is in the default domain. However, the subdomain wouldn't resolve there.

So, I then created another site on the same Forge box, using the same app repo but created the site with the domain subdomain.example.com.

Now that subdomain resolves to this error;

Not Authorized to View This Page [CFN #0004]

What am I missing?

0 likes
5 replies
ejdelmonico's avatar

Check your nginx config. Forge configures for the primary host name so you need to delete the default site and add the new site as subdomian.example.com. Then, check your nginx config to make sure it is correct.

RushVan's avatar

Hey @ejdelmonico. So I had a chance to tackle this. I dumped the site and default site and recreated. I can see that my subdomain dns A record is pointing to the right IP, however the site is unreachable. I am getting a 'server DNS address could not be found' error.

I am an nginx noob. So while I can see the config, I am not sure what I should be looking for.

Any chance you could give me a nudge? Thanks!

RushVan's avatar

Just for some info,

This is what is in the config;

server { listen 80; listen [::]:80; server_name subdomain.example.com; root /home/forge/subdomain.example.com/public;

Looks the same as other subdomains I have wit Forge. Except for this bit - listen [::]:80;

Should that be removed?

mesqueeb's avatar

I have exactly the same problem...

I now have 2 sites on my server, both added through forge:

  • lucaban.com
  • listo.lucaban.com

Both have a different Github repository and the subdomain one (listo) is a static HTML one.

These are my DNS settings:

  • lucaban.com A 192.81.222.17
  • *.lucaban.com A 192.81.222.17

both pointing to the same server with an A record.

The problem:

when you open listo.lucaban.com it says it cannot find the DNS record...

ERR_NAME_NOT_RESOLVED

I also tried changing *.lucaban.com with listo.lucaban.com but it still doesn't work.

Please or to participate in this conversation.