Community

Need to have www in my domain. How can I do that?

JA
Joabe Arruda #2

You just need to insert this into your .htaccess

# Redirect non-www URLs to www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteEngine On
RewriteCond %{HTTPS}  !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
JA
Joabe Arruda #3

Or you can use Cyberpanel’s own feature:

Websites > List Websites > Your Site > MANAGE > CONFIGURATIONS:

JA
Joabe Arruda #4

But be careful not to replace or remove a fundamental rule for your application to work, since I don’t know what application or system you are configuring. :slight_smile:

BACK UP YOUR (.htaccess) FIRST.

Sign in to reply