I’m working on a webapp where users can connect their profile to their domains, but how do I enable wildcard dns in digitalocean? Using vhosts or from the domain panel? Eg: If the user profile is https://webapp.com/user It will be shown on https://user.com/ once the user connects the domain.
I’m using
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
@Cybil Here is the approach I would take:
Update DNS to direct all subdomain requests to your Droplet
webapp.com
without any subdomains to the DO Control Panel.*
is the host name and your droplet is selected as the target so that all subdomains routeNow the DNS record is directing all subdomain URL requests (
user1.webapp.com
,user2.webapp.com
) to your Droplet. To ensure the root domain is also pointing to webapp.com, add an@
A-Record too.Note: From our documentation:
Update Apache config on Droplet to map all subdomains to the right webapp route
mod_vhost_alias
extension on Apache withsudo a2enmod vhost_alias
and then restart Apache withsystemctl restart apache2
Lastly restart apache again with
systemctl restart apache2
Hi,
Maybe you want to say https://users.webapp.com? Your question is to add subdomains for every user and enable https access?
Maybe you can turn to acme.sh and it will redirect to a GitHub repo with more information on setting up https. At there you can find what you want.
As for wildcard subdomains, just add
*.webapp.com
in your DNS console. That means,*
is the record, and YOUR SERVER IP is the value.Regards, Shiroka