VHOST ServerAlias for site availability on both www and not-www domain

I’d like to see a mechanic that adds a www.domain.local to a Local site at domain.local

I tried creating an add-on for this, but the documentation on creating add-ons is hard to find (mostly because Local is a very common term for way more software than Local by Flywheel) and the documentation I could find has empty docs for hooks and stuff.

What needs be done is;

add alias www.domain.tld when user omits www., or add alias domain.tld when user does enter www.
this alias must go in the vhost config file;

(apache)
ServerName domain.tld
ServerAlias www.domain.tld

(nginx)
server_name domain.tld www.domain.tld;

and to the host file;
192.168.75.100 domain.tld www.domain.tld #Local Site

With pointers on how to manipulate these values from an add-on, I’d be happy, with native support in Local, I’d be way more happier :slight_smile:

Thank you, and thanks to the community in advance for votes :slight_smile:

Hi Remon,

Thank you for the feedback!

We’ve actually already done this and it will be coming out in the next major update. :slight_smile:

As far as the add-on API goes, we’ll be revisiting this soon. We’ll focus on improving the documentation and providing more add-on examples.

I would call that

“AWESOME!, by FlyWheel”

:slight_smile:

ta!

1 Like