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

gmanish's avatar

Subdomain Routing Not Working

I have an app set up with Forge on a Digital Ocean server. This app has a sub domain, guests.myapp.com.

After deploying my app, the myapp.com domain works, but, the guests subdomain, is not working (404: Not Found Error)

My routes are modelled after the example in the official doc, like so:

Route::group(['domain' => 'guests.myapp.com'], function () {
    Route::get('user/{id}', function ($id) {
        //
    });
});

I did not choose "enable wildcard sub-domains" as I am not using them.

Do I needs to do anything else to get the sub domain working?

So far, I am working with the default, Forge provided, config files. I have only changed the .env.

0 likes
0 replies

Please or to participate in this conversation.