πͺRestaurant Subdomain
Last updated
Last updated
The most commonly used shared hosting framework is cPanel. Therefore, our guide will focus on it, although similar steps should apply to Plesk or any other solution.
Once your main domain or subdomain is active and your site is operational, you can assign each restaurant its own domain, as demonstrated in our demo.
While the main site is hosted at https://natadtech.com/ and features all restaurants, each individual restaurant can also be directly accessed. For example, https://natadtech.com/.
This feature is directly enabled in your FoodMonkey site. However, you will need to create a wildcard subdomain that uses the same folder as your main site to fully utilize it.
Log into your cPanel.
Proceed to the Subdomains menu within the Domains section.
Generate a subdomain using the asterisk symbol (*)
Specify "*" as the subdomain.
Choose your domain from the dropdown menu.
Choose the same document root, typically /public_html, and confirm your selection.
Navigate to the Zone Editor menu.
Ensure that there is an A record for *.yourdomain.com created and pointing to the server IP address. This IP address may coincide with the IP address of your main domain or ftp.yourdomain.com.
Now, you'll need to wait for the propagation to complete. This process typically takes N seconds, where N is the TTL (Time To Live) for the A record. You can manually edit the TTL and reduce the number to speed up the process.
Once propagation is complete, the wildcard subdomain will function correctly. Each restaurant will now have its own subdomain automatically assigned.
You can open some restaurants on your site as examples.
https://natadtech.com -- > https://diner1.natadtech.com
In this case the subdomain is Diner1.
Login as admin in your project and navigate to Settings / Setup. From there, select WILDCARD_DOMAIN_READY.
Article Instructions copied from
By default, wildcard subdomains are not SSL protected. To secure them, you can purchase or issue a wildcard SSL certificate, though they can be somewhat expensive. Alternatively, you can use https://letsencrypt.org/ to create your own free wildcard SSL certificate.
Plesk, by default, can enable SSL on wildcard subdomains. You can also refer to this guide for assistance.
Our demo site operates on Laravel Forge, which also offers the option to automatically create wildcard SSL certificates via Digital Ocean NS.
If you wish to point another domain to your FoodMonkey site or to a single restaurant (e.g., your client's restaurant domain should direct to the corresponding page on your FoodMonkey site), your client needs to forward their domain or subdomain to the restaurant's subdomain.