> For the complete documentation index, see [llms.txt](https://phplime-envato.gitbook.io/qrexorder/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://phplime-envato.gitbook.io/qrexorder/configuration/restaurant-subdomain.md).

# Restaurant subdomain

**Requirements:**

1. Wildcard subdomain supports.
2. SSL for wildcard subdomain
3. QrexOrder Script installed in the domain main folder. **not subdomain / sub folders**

## Set up wildcard subdomain&#x20;

Most commonly used shared hosting framework is cPanel. So we will write our guide for it. But things should be similar in Plesk or any other solution.&#x20;

After you have your main domain or subdomain active, and your site is up and running, you can make each restaurant to have their own domain. Like in our demo.

The main site is <https://thinkncode.net> and there you can find all restaurants. But each restaurant can be also directly open for example: <https://phplime.thinkncode.net>. This feature is directly enabled in your QrexOrder site. But you will need to create a wildcard subdomain that uses the same folder as your main site.&#x20;

1\. Log into your cPanel.\
2\. Navigate to **Domains** section > **Subdomains** menu:

<mark style="color:purple;">In cPanel new version</mark> <mark style="color:purple;"></mark><mark style="color:purple;">**subdomain**</mark> <mark style="color:purple;"></mark><mark style="color:purple;">moves on domains section. if you still have the</mark> <mark style="color:purple;"></mark><mark style="color:purple;">**subdomain**</mark> <mark style="color:purple;"></mark><mark style="color:purple;">option in cPanel then follow the</mark> <mark style="color:purple;"></mark><mark style="color:purple;">**subdomain**</mark> <mark style="color:purple;"></mark><mark style="color:purple;">instruction otherwise you can follow the</mark> <mark style="color:purple;"></mark><mark style="color:purple;">**domain**</mark> <mark style="color:purple;"></mark><mark style="color:purple;">option.</mark>

{% tabs %}
{% tab title="Sub domain" %}

<figure><img src="/files/27GI7rMvws3sDW7yTL3W" alt=""><figcaption><p>click on sub domain</p></figcaption></figure>

<figure><img src="/files/2eOE2GvE2Jjs8XiutX0d" alt=""><figcaption><p>select the document root</p></figcaption></figure>

{% endtab %}

{% tab title="Domain" %}

<figure><img src="/files/5BHT1rDhrg8ywIZVm7r0" alt=""><figcaption><p>Click on domains</p></figcaption></figure>

<figure><img src="/files/v93Dz6czLVgynBKOiz0d" alt=""><figcaption><p>Then Create a new domain</p></figcaption></figure>

<figure><img src="/files/pOtz8Ahg95BwLiJBNyX5" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

4\. Go to the **Zone Editor** menu:

<figure><img src="/files/ACe5B8AYE3SKBdrS5HXS" alt=""><figcaption><p>Click on zone editor</p></figcaption></figure>

5\. Make sure that there is an **A record** for **\*.yourdomain.com** created and pointed to the server IP address (it could coincide with the IP address of your main domain or ftp.yourdomain.com is pointed to):

<figure><img src="/files/XX0YMn0zfSg9Ke6J88NA" alt=""><figcaption></figcaption></figure>

6\. Now, you will need to wait until the **propagation is over** (it should take N seconds, where N – is **TTL** for this A record; you can edit it manually and reduce the number to speed up the process), and then the wildcard subdomain will work correctly.

#### <mark style="color:purple;">Now create a subdomain according to your restaurant request</mark>

<figure><img src="/files/4rfCwxaLMBUUYDWDyBg5" alt=""><figcaption></figcaption></figure>

Make sure subdomain path is your root directory (where qrexorder is installed).

Now you can use sub domain features.\
You can use [thinkncode.net/phplime](https://qmenu.thinkncode.net/) & [phplime.thinkncode.net](https://phplime.thinkncode.net/) both URL

Check more in Namecheap doc.

{% embed url="<https://www.namecheap.com/support/knowledgebase/article.aspx/9191/29/how-to-create-a-wildcard-subdomain-in-cpanel>" %}

##
