Control Web Panel
WebPanel => DNS => Topic started by: belveder on March 27, 2016, 06:22:47 PM
-
Hello,
I have a wiered problem.
Since I moved to CentOS Web Panel, my domain is not working without 'www'. It only works like www.domain.com , but it doesn't open if you type domain.com
Any tips how to solve that through Centos Web Panel?
-
Redirect non www to www in .htaccess
-
Can you show me example for that?
I'm using WordPress website and SMF forum...I tried putting in .htaccess something but it didn't quiet work.
-
Can u pm the domain or u can post here
-
Sure, it's www.juvebalkan.com
-
Your domain's dns records are not properly setup. Check your name server and dns records.
-
If you moved to new server with new ip check the server ip in name server (child name server)
-
Thank you for your answer.
I'm actually using this server (VPS) from 2012, so it's not a new server.
People can actually access it normally if they type www.juvebalkan.com but they can't if they type only juvebalkan.com
So I was wondering if there is anything I am missing here...
-
It is name server problem ... Name servers are not correctly configured
-
Can I configure that through Centos Web Panel, and if yes, how can I do that so it can work and without www. ?
Thanks!
-
I'll recommend you to use cloudflare dns or cwp free dns services...
-
Can I configure that through Centos Web Panel, and if yes, how can I do that so it can work and without www. ?
Thanks!
yes you can, at least you need two line like this
juvebalkan.com 0 IN A 84.200.77.148
www 0 IN CNAME juvebalkan.com
-
Thanks Jae.
I added that and restarted named service.
But I'm not quiet sure if it's working now without www
-
Actually, it doesn't let me add that at all.
I add that, click Save, and when I open it again, it's not there, it's not saved...Edit file or Edit records, both won't save the changes
-
http://leafdns.com/index.cgi?testid=92C163F4
no records for your domain
-
Hi, try to edit the file /var/named/juvebalkan.com.db directly and add the record.
-
Hi, try to edit the file /var/named/juvebalkan.com.db directly and add the record.
I think he messed the bind server
-
I added those lines directly through SSH, but when I tried to restart named service, I got this:
[root@capitano ~]# /etc/init.d/named restart
Stopping named: . [ OK ]
Starting named:
Error in named configuration:
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0
dns_master_load: /var/named/www.juvebalkan.com.db:23: www.www.juvebalkan.com: multiple RRs of singleton type
zone www.juvebalkan.com/IN: loading from master file /var/named/www.juvebalkan.com.db failed: multiple RRs of singleton type
zone www.juvebalkan.com/IN: not loaded due to errors.
_default/www.juvebalkan.com/IN: multiple RRs of singleton type
I edited again and removed those lines and it started ok again
-
http://leafdns.com/index.cgi?testid=92C163F4
no records for your domain
So you think my custom nameservers are not properly configured? It's standard GoDaddy feature, I had them before and everything was working ok
-
zone www.juvebalkan.com/IN: not loaded due to errors.
seem you wrong entering domain, juvebalkan.com is your domain, but you enter www.juvebalkan.com subdomain as main domain.
-
You are probably right...when I created domain account, I entered www.juvebalkan.com and it automatically created this DNS record.
I don't have anything for juvebalkan.com in the list
What should I do, any solution for that? Maybe create a new DNS record and replicate www.juvebalkan.com entry with juvebalkan.com?
-
Hello.
Yes, you should create additional domain juvebalkan.com and add to it subdomain www .
-
Can I, for example, create new account/domain juvebalkan.com and in the hosting itself make PHP redirection to www.juvebalkan.com or something
Would that work?
-
Hello.
Yes, you should create additional domain juvebalkan.com and add to it subdomain www .
Can you, somehow, expand the answer a little bit?
So I should create a new account in CWP, and add domain name juvebalkan.com or should I just create DNS record for juvebalkan.com?
Thanks!
-
The best and correct step, backup you web. delete user with www.juvebalkan.com domain, then create user with juvebalkan.com domain and restore all web content.
-
Is there any way to modify the current setting or add some record without moving my data?
-
All I want is to somehow redirect everything from juvebalkan.com to www.juvebalkan.com
-
Is it a good solution to create new account/domain with juvebalkan.com and just input .htaccess there with following lines:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Would that work good?
-
If DNS record for juvebalkan.com does not exists a redirects won't be works.
You have to configure your DNS records for juvebalkan.com and www.juvebalkan.com
-
Can I do that through CWP?
If yes, how?
Thanks.
-
yes
just add A record and cname record for www
you need to add ns records also
-
Do I edit existing DNS zone, or create new one, or...?
-
delete all dns records and create new one :-
A
Cname
MX
NS
A record will be non www and should point to server ip address
eg.
A domain.com 192.168.0.1
cname www domain.com
-
So you are saying following:
- I should delete DNS zone for www.juvebalkan.com
- Create new DNS zone for juvebalkan.com with the same IP address
And everything will work ok?
-
yes .... after that create a .htaccess file to redirect non www to www and edit the domain url setting in WordPress admin settings. to www.domain.com
-
Can moderator or administrator confirm this should work?
I already have WordPress redirecting to www. anyway, and htaccess lines also
(because only www.juvebalkan.com works, juvebalkan.com doesn't opet anything, doesn't resolve)
-
you dns record should be non www to redirect to www ... if your existing record is for www.domain.com then how it will redirect non www. to www
-
But what about website files and databases, since they are created to be on www.juvebalkan.com ? Will they remain there and will juvebalkan.com load them properly from they same position on the server as they are now?
-
htaccess script will do the trick by redirecting non www to www.
files and databases will be safe.
-
Hi re-direction will of course work though none of these seem to be good solutions it seems by Default CWP will assume your preference is for www.mydomain.com to me www is just completely unnecessary so how would one Configure CWP so that when new user accounts are added the "mydomain.tld" will work to account/public_html/index.html
it seems the extra step of adding the .htaccess redirection is needed every account
Thanks, Garry, Central Australia
-
delete all dns records and create new one :-
A
Cname
MX
NS
A record will be non www and should point to server ip address
eg.
A domain.com 192.168.0.1
cname www domain.com
My domain is s4hosting.in hostname is cwp.s4hosting.in using cloudflare ns records dns records are looking fine http://leafdns.com/index.cgi?testid=196F7599 but still i couldnt renew letsencrypt ssl every time getting www or without ww error can u pls help in this......