Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressページをSSLで保護する方法

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

過去に、WordPressのページを保護するためにSSL証明書を使用する必要があるテクニックをいくつか紹介しました。最もポピュラーなものは、WordPressで非営利団体のための寄付フォームを作成することです。非営利団体の多くはAuthorize.Netを好んで使用しており、セキュリティで保護された(https://)ページを持つ必要があります。この投稿では、WordPressのページをSSLで保護する方法を順を追って説明します。

まず最初にSSL証明書を取得し、セットアップする必要があります。すでにSSL証明書を用意しているかどうかは、ホスティングサービスに問い合わせることができます。いくつかは、ホスティングアカウント(例えばHostGatorビジネスプランの使用クーポン“wpbeginner“のための最初の月のための0.01ドルで開始する)とSSL証明書を提供していますか.あなたのホスティングは、初期設定で利用可能なものを持っていない場合は、有料サービスとして持っているかどうかを尋ねてください(大半はそうです)。有料サービスは年間$50~$200です。私たちが見つけた最も安いものは、年間$12.99でGoDaddy経由で取得することでした。このサービスの欠点は、1つのドメインにしか使えないことと、初期設定にワイルドカードオプションがないことです。そのため、store.xyz.comのようなサブドメインを持っていて、そこでも使用することはできない。サーバーにSSL証明書をセットアップするには、ホスティングサービス会社に詳細を伝えるだけです。

サーバー上でSSL証明書を使用する準備ができたら、次はWordPressに実装する必要があります。最も簡単な方法は、WordPress HTTPsプラグインをインストールして有効化することだ。有効化したら、設定 ” WordPress HTTPSメニューに進みます。SSLホスティングサービス名(ドメイン名)を入力します。次に、「SSLを排他的に強制する」にチェックを入れる。これは基本的に、サイト上のいくつかのページのみがHTTPSになり、他のページはHTTP(通常)にリダイレクトされることを意味します。必要であれば管理者にSSLを強制することもできますが、必須ではありません。

WordPress HTTPs

それでは、WordPress管理画面の「ページ」タブを開いてみましょう。SSL証明書を導入したいページ(購入手続きページや寄付ページなど)を選択します。クリックしてページを編集します。公開するボタンのすぐ上に、強制SSLという新しいチェックボックスがあります。

Force SSL in WordPress

チェックボックスにチェックを入れ、公開/更新をクリックしてください。これであなたの新規ページは保護されたページになります。Google Chromeで小さな緑色のサインが表示されることを本当に〜してもよいですか?

Chrome SSL Error

基本的には、URLの横に緑色のサインが表示されれば完了です。今すぐこの投稿を読むのをやめてください。黄色か赤のサインが表示されている場合は、投稿を続けてください。

SSLページの非SSL要素を修正する方法

Google chromeはサイトに潜在的なリスクがあると判断した場合、黄色か赤のアイコンを表示する。Firefoxはユーザーに警告するエラーアラートメッセージを表示するので最悪です。これはあなたのサイト(特に非営利団体の寄付ページ)の評判にとって良いことではありません。黄色のメッセージや赤のメッセージが表示された場合、セキュリティで保護されたページに安全でないコンテンツがあることを意味します。つまり、画像やスクリプトが https:// ではなく http:// になっている可能性があるということです。なぜそうなるのか不思議に思うかもしれません。WordPressで寄付ページに画像を挿入したり、サイドバーに画像(ソーシャルアイコン)を設置したり、ソーシャルメディアのスクリプト(facebookのいいね!ボックス)を設置したり、その他のメディア項目を設置したりした場合、そのページは安全でないコンテンツになります。これを素早く解決するには、iThemes Fix SSL/Non-SSL Linksプラグインを使用します。

このプラグインは、ページ上の http:// リクエストをすべて https:// リクエストに変更します。これによりサーバーの負荷が増加しますが、それほど大きなものではありません。

このプラグインは、あなたが手動で追加したもの(サイドバーのiFrameのようなFacebookなど)を変更しないことに注意することが重要です。どうせなら、https://。このプラグインはヘッダーなどに読み込まれるスクリプトをすべて処理します。適切にコーディングされていないプラグインは問題を引き起こします。これらの修正はケースバイケースです。

この投稿がお役に立てれば幸いです。何か質問があれば、以下にコメントをしてください。

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

34件のコメント返信を残す

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. THANKGOD JONATHAN says

    I am a little confused here. Is setting up SSL for the main site and for pages different?
    I mean do I need to set up SSL for my site and also set up for pages again differently?

    • WPBeginner Support says

      This is one of our older articles, it is better to set up SSL for the entire site.

      管理者

  3. Zaid Sparrow says

    I’m using SSL on my WordPress and i created a sub domain but i dont know why it’s redirecting sub domain to main website?

  4. Saurabh says

    With premium SSL by godaddy statndard SSL certificate comes free.So may I know what actually is the difference.For e-commerce website should I use it only on checkout page or it can be used for all pages ?

  5. ThirstyJon says

    This plugin author has not updated the plugin since March of 2013.

    I noticed in the support forum for the https plugin that several people (including me) are having a problem with the plugin forcing the search form to be insecure.

    This causes a note in Google Chrome that a form on the page is not secure.

    Who is going to shop on a site that says a “form” is insecure?

    The https plugin has a function that forces all pages that are not set to ssl to be non-ssl.

    This is handy because I have at least one page on my site that will not work if the page is forced to ssl.

    So I have to choose between having the search form OR having the one page work.

    I am wondering if there is another plugin you could recommend that is actually kept up to date?

  6. Jason C. says

    how about changing the images that are unsecure manually instead of using a plugin? I’ve done it before, but can’t for the life of me remember how I did it.

  7. Fahad M Rafiq says

    After the Google announced that SSL is now a ranking factor. Everyone is rushing towards moving their website to HTTPS.

    But most people do not realize there are many things people forget to do, like for example blocking HTTP pages from indexing and submitting HTTPS website to Google Webmaster tools again.

  8. Jeff Dworkin says

    I am trying to use the bluehost Free Shared SSL Certificate.

    I get a 404 error on any page that I for which I click “Secure Post”

    Does anyone have any idea about what I may have set up incorrectly.

  9. lbbb2 says

    what happens if the plugin is causing a redirect loop. I checked all my plug ins and the wordpress https was what is causing it am i using it too much or am I using it wrong I followed all of the instructions and still loops.

    • Tom says

      What was the time lapse between you getting your SSL cert and you installing the plugin? I had this same issue when I had purchased the SSL cert the time lapse between me going to sleep and getting up in the morning had rectified the problem.

      I believe this has something to do with your hosting company setting up your domain with an SSL cert.

      TLDR: Allow time for your cert to be correctly set up as it access CNAME records to do this which can cause issues.

  10. Allen Resha says

    So I used this plugin. It works great, except my blog 404’s when I use any permalink structure other than default. All other pages work fine. If I take the Force SSL off of my home page and blog, it fixes the problem, but I want my homepage and my blog page (that lists my posts) to be secure.

    What do you suggest? Help would be appreciated. I am testing on my site (which is being rebuilt), but I need it on a site for a social good project. This is really holding back my process! Your help would be greatly appreciated. I will show you much Twitter/Facebook/Google + and any kind of love you need! :)

  11. Danny says

    I added the plugin as well as the Fix Non-SSL plugin and I still get the insecure data warning. Any suggestions?

  12. Ariel Frailich says

    Hi! If memory serves (it’s been years), when you install a cert, you specify a folder to be secure. For WP, is this folder in the WP path or outside of it, and if outside, what has to be moved into it? Or should SSL be set up to include the whole site? Thank you for any info (or link to such) !

    • Editorial Staff says

      You are getting this error because your SSL certificate is not trusted. Where did you purchase the SSL from? Are you sure that it is properly installed. Just purchasing the certificate doesn’t do anything. You have to make sure that it is installed on your server as well.

      管理者

  13. RichardC says

    Excellent post!
    Too bad the plugin author can’t be bothered to write any docs.
    Let’s hope he reads this article and asks permission to use it as the seed for a manual.
    Good Job to Staff on this Article!!

  14. Jon Tobey says

    I installed the plug in, but when I go to a page, I don’t see the “force SSL” box. However, I do see an HTTPS box below the Page Attributes button. Has the UI changed?

  15. dalee says

    Is there a way to automatically do this? example using wp_insert_post() function then make the added post secure? without manually checking the checkbox?

  16. Yogi says

    Thank you for the information. I was going to do the old ways by using .htaccess, but this definitely saves me tons of time.

  17. Joshua says

    Thanks for the article. You really saved my butt. I could not figure the SSL out for the life of me. But after reading this I was able to get it working in 5min. High Five!

  18. wmwebdes says

    I’ve just started looking at SSL certificates.
    A client asked if I could set them up an eCommerce site, which I understand requires SSL for bank account details etc.
     
    Thanks for a timely article.

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。