리눅스 호스팅 (cPanel) 도움말

Redirect my website to HTTPS in cPanel/Linux

If you have a secure certificate (SSL) on your website, you can automatically redirect visitors to the secured (HTTPS) version of your website to make sure their information is protected.

How you redirect traffic depends on the type of hosting you have.

Note: These instructions do not apply to WordPress installed on cPanel. For more information, see Redirect my WordPress website to HTTPS in cPanel hosting

Linux-based accounts use .htaccess files to handle redirection.

If you do not have a .htaccess file:

Start by creating a .htaccess file in your public_html or webroot folder. Inside of the .htaccess file, you can use the following code to redirect visitors as long as you do not already have a .htaccess file set up:

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?coolexample\.com
RewriteRule ^(.*)$ https://www.coolexample.com/$1 [R,L]

If you are hosting multiple websites on the same account, you will need to make sure that you have a .htaccess file set up in the directory of the website that has a SSL certificate issued.

If you have an existing .htaccess file:

  • Do not duplicate RewriteEngine On.
  • Make sure the lines beginning RewriteCond and RewriteRule immediately follow the already-existing RewriteEngine On.

More info


이 글이 도움되었나요?
피드백을 보내주셔서 감사합니다. 고객 서비스 담당자에게 문의하시려면 지원 전화 번호 또는 위의 채팅 옵션을 이용하시기 바랍니다.
도와드릴 수 있어 기쁩니다! 더 도와 드릴 것이 있나요?
그것 유감스럽습니다. 혼동이 되었던 사항 또는 솔루션이 고객님의 문제를 해결하지 못했던 원인을 알려주세요.