Author Topic: domain.com to www.domain.com  (Read 616 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
domain.com to www.domain.com
« on: August 10, 2017, 01:23:30 PM »
Hi, I created the domain domain.com in the control panel. If i go to http://domain.com I view the HTTP Server Page but I would to redirect domain.com to www.domain.com.

Can I do it? How do you do it?

Thanks

Offline
*
Re: domain.com to www.domain.com
« Reply #1 on: August 11, 2017, 07:04:04 PM »
??

Offline
***
Re: domain.com to www.domain.com
« Reply #2 on: August 12, 2017, 01:52:11 PM »
Normally when you create domain.com, the CWP automatic creates www.domain.com as an ServerAlias in the Apache, localhost.domain.com, ftp.domain.com, mail.domain.com and www.domain.com as a CNAME in Bind(DNS). So, just try to open www.domain.com in your browser. If it`s not working than let me know and we will figure it out.
Current uptime (FreeBSD 8.1-RELEASE-p17):
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
**
Re: domain.com to www.domain.com
« Reply #3 on: August 13, 2017, 12:16:24 PM »
I use CloudFlare for DNS and set 301 redirects to preferred domain  :)
Web Design, Development & VPS Hosting
https://6sense.com.au

Offline
*
Re: domain.com to www.domain.com
« Reply #4 on: August 13, 2017, 12:31:36 PM »
Hi,
the www "version" of the website works correctly but if I write the URL without www I see the HTTP Test Page powered by CWP | CentOS-WebPanel.com.

The DNS zone is managed by OVH, not by CWP (it's an error?).

Offline
***
Re: domain.com to www.domain.com
« Reply #5 on: August 14, 2017, 04:37:48 AM »
Hi,
I`ve never used OVH, but you should change the "DocumentRoot" in OVH for domain.com to point on the same place where www.domain.com is pointing and you should be ok. Try and let me know.
Current uptime (FreeBSD 8.1-RELEASE-p17):
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
*
Re: domain.com to www.domain.com
« Reply #6 on: August 14, 2017, 01:06:52 PM »
Hi, I managed the DNS zone with OVH...I haven't any VPS/Dedicated Server/Hosting with OVH.

I check the /usr/local/apache/conf.d/vhosts.conf and this is the content:

# vhost_start domain.com
<VirtualHost ip:80>
ServerName domain.com
ServerAlias www.domain.com
ServerAdmin 5
DocumentRoot "/home/g123ftp1/public_html"
ScriptAlias /cgi-bin/ "/home/g123ftp1/public_html/cgi-bin/
#
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/g123ftp1/domain.com/*.conf

<IfModule mod_suexec.c>
        SuexecUserGroup g123ftp1 g123ftp1
</IfModule>

<IfModule mod_suphp.c>
        suPHP_UserGroup g123ftp1 g123ftp1
        suPHP_ConfigPath /home/g123ftp1
</IfModule>

<Directory "/home/g123ftp1/public_html">
        AllowOverride All
</Directory>

</VirtualHost>
# vhost_end domain.com

I tried to add "ServerAlias domain.com" but is the same.

What can I do?

P.S. I compared the DNS zone of CWP with the DNS zone of OVH and there are the same records.