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

JoerJoers's avatar

Laravel Forge - Subdomain links to different repository

Is it possible in Forge to subdomain that links to other Directory? For example, i have a main domain, domain.com links to repository #1 and subdomain, admin.domain.com links to repository #2 but i only have 1 ip from Digital Ocean.

0 likes
4 replies
ahuggins's avatar

yes it's possible. In Forge, when managing your server, there is a section to "Add a Site." Add your subdomain site...admin.domain.com and set the repository. Then to make it work, you will need to go to your domain regsitrar and set up a CNAME for the subdomain and point it to the main domain.

That should set it up.

Let me know if it works or if you run into an issue.

2 likes
JamesSiebert's avatar

@ahuggins Thanks :) Mine was in Route53 but I set the CNAME www.subdomain.example.com + CNAME www.subdomain.example.com to both point to www.example.com and set up the 2nd site in forge and all worked :)

alexhackney's avatar

Actually an A Record would work too.

I always think of subdomains as a seperate domains. You need to tell the visitor what the address of the subdomain is.

Alex

ejay010's avatar

hey this might be out of place but i gotta know, what is a recipie

Please or to participate in this conversation.