PDA

View Full Version : How to properly add subdomain in zPanel



Fli
11-20-2015, 11:58 AM
zPanel can be tricky. I added new subdomain and when opened my subdomain in Firefox web browser, i got error:

"Unable to connect
Firefox can't establish a connection to the server at *"

So i checked DNS configuration file in aim to find where are my DNS zone files, if they was updated.

# cat /etc/zpanel/configs/bind/etc/

i found that zone files are stored in /etc/zpanel/configs/bind/zones/

apparently zone file for my domain was NOT updated.

So i went into zPanel and DNS Manager section, into my domain and there "CNAME" section and there add new hostname.

if i had mysubdomain.domain.tld, i would use: mysubdomain 3600 @

then click "Save Changes" button, not only "Save" button.

then my zone file was updated and i used web proxy http://anonymouse.org to see my subdomain now working. When accessing not via proxy it do not works and Firefox still complaints. This is some DNS cache issue and will get resolved automatically soon.

Tutorial on how to properly add subdomain in zPanel


How to create a sub-domain in zPanel:

1. Login to ZPanel as user
2. Click "Sub Domains"
3. Enter sub-domain prefix and select the domain
4. Use create new home directory
5. Click "Create"
6. Now go home
7. Then click "DNS manager"
8. Select your domain
9. Under CNAME - You will need to add new record for the prefix of your sub domain
10. Then click "Save Changes"

source (https://clients.hostwinds.com/knowledgebase/69/How-to-create-a-sub-domain-on-zPanel.html)

imort
05-19-2016, 06:30 AM
When accessing not via proxy it do not works and Firefox still complaints. This is some DNS cache issue and will get resolved automatically soon.


You're probably using a Windows PC at the time because Linux didn't have DNS caching by default.

If you didn't want to wait for DNS cache to be renewed by itself (which can take some time) you can run this command with admin privileges at the command prompt:


ipconfig /flushdns

If you're using your router or modem as DNS server it's won't help though, so you'll have to wait anyway or reboot it.
You can look for more related information about the DNS work and probable issues here (https://serversuit.com/community/technical-tips/view/3-things-you-should-know-about-dns.html).