Making SSL and www settings are important for your website and SEO. If you don't make these settings, you can see problems with icons and other resources on your site. Also, you can see some other important problems like "Blocked Mixed Content" and "Cross-Origin Request Headers(CORS) with PHP headers". You may become unable to use your site as these errors will prevent requests sent to the server.

Making SSL Settings

If you have SSL on your website, you need to open the .env file (this file is in the root directory of your website) and define the app.baseURL variable with HTTPS.

After this, you need to redirect all HTTP URLs to HTTPS URLs to enable SSL for all your links. To do this, you can go to your cPanel and force HTTPS for your domain from the "Domains" section. 


Making WWW Seettings

You can use www or non-www URLs for your site. But for a better website and SEO, you should choose one of them. If you will not use www in your URLs, you need to set the app.baseURL variable without adding www.


After that, you need to open the .htaccess file (this file is in the root directory of your website) and you need to add the following codes to just below the "#Add New Redirects Here" line:

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

If you will use www in your URLs, you need to set the app.baseURL variable with www.


After that, you need to add the following codes to just below the "#Add New Redirects Here" line in the .htaccess file:

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]