In passato abbiamo mostrato alcune tecniche in cui è necessario utilizzare un certificato SSL per proteggere le pagine di WordPress. La più popolare è la creazione di un modulo di donazione per le organizzazioni no-profit in WordPress. Molte organizzazioni no-profit preferiscono utilizzare Authorize.net, che richiede una pagina protetta (https://). In questo articolo vi mostreremo passo dopo passo come proteggere le vostre pagine di WordPress con SSL.
La prima cosa da fare è acquisire e configurare un certificato SSL. Potete chiedere al vostro ospita se ha già un certificato SSL disponibile per voi. Alcuni forniscono il certificato SSL con l’account di hosting (ad esempio HostGator Business Plan utilizza il coupon“wpbeginner” per iniziare a 0,01 dollari per il primo mese). Se il vostro ospita non ne ha uno predefinito, chiedete loro se lo hanno come servizio a pagamento (la maggior parte lo ha). Il costo può variare da 50 a 200 dollari all’anno. Il più economico che abbiamo trovato è stato quello offerto da GoDaddy per 12,99 dollari all’anno. L’aspetto negativo è che si può usare solo su 1 dominio e non ha un’opzione jolly predefinita. Quindi non è possibile avere un sottodominio come store.xyz.com e usarlo anche lì. Per configurare un certificato SSL sul server, è sufficiente fornire i dettagli alla società di hosting, che provvederà a farlo per voi.
Una volta che il certificato SSL è pronto per essere utilizzato sul server, è necessario implementarlo in WordPress. Il modo più semplice è installare e attivare il plugin WordPress HTTPs. Dopo averlo attivato, andate su Impostazioni ” WordPress HTTPS”. Inserite il nome dell’host SSL, che sarà il vostro dominio. Quindi selezionate la casella Forza SSL in modo esclusivo. Questo significa che solo alcune pagine del sito saranno HTTPS, mentre le altre saranno reindirizzate su HTTP (normale). Se si vuole, si può scegliere di forzare l’SSL per l’amministratore, ma non è necessario.
Ora andiamo alla scheda Pagine nel pannello di amministrazione di WordPress. Selezionate la pagina su cui volete avere un certificato SSL (probabilmente la pagina di pagamento, la pagina delle donazioni, ecc.) Fate clic per modificare la pagina. Proprio sopra il pulsante di pubblicazione, c’è un nuovo checkbox che dice Forza SSL.
È sufficiente selezionare la casella e fare clic su Pubblica/Aggiornamento. La nuova pagina sarà ora una pagina protetta. Assicuratevi di ottenere il piccolo segno verde in Google Chrome.
In pratica, se il segno verde è accanto all’URL, il gioco è fatto. A questo punto dovreste interrompere la lettura di questo articolo. Se vedete un segno giallo o rosso, continuate a leggere l’articolo.
Come correggere gli elementi non SSL su una pagina SSL
Google chrome mostra un’icona gialla o rossa se vede un potenziale rischio sul sito. Firefox è il peggiore perché mostra un messaggio di errore che mette in attenzione l’utente. Questo NON è un bene per la reputazione del vostro sito web (specialmente per la pagina delle donazioni delle organizzazioni non profit). Quando viene visualizzato un messaggio giallo o rosso, significa che su una pagina protetta sono presenti contenuti non sicuri. Ciò significa che le immagini e gli script potrebbero essere http:// invece di https://. Vi starete chiedendo perché mai? In pratica, se avete inserito un’immagine nella vostra pagina di donazione tramite WordPress, se avete immagini nella barra laterale (icone sociali), se avete script di social media (facebook like box) o qualsiasi altro tipo di elemento multimediale, la vostra pagina ha un contenuto insicuro. Per correggere questo problema è sufficiente utilizzare il plugin iThemes Fix SSL/Non-SSL Links.
Questo plugin cambierà semplicemente tutte le richieste http:// sulla pagina con richieste https://. Ciò causerà un aumento del carico del server, ma non è abbastanza significativo.
È importante notare che questo plugin non altera nulla di ciò che viene aggiunto manualmente (ad esempio, facebook come iFrame nella barra laterale, ecc.) Dovreste comunque averli con https://. Questo plugin si occupa di tutti gli script caricati nell’header e simili. I plugin che non sono codificati correttamente possono causare problemi. Questi correggi sono da effettuarsi caso per caso.
Speriamo che questo articolo vi abbia aiutato. Se avete domande, potete lasciare un commento gratuito qui sotto.
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!
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.
Admin
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?
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 ?
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?
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.
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.
jx says
Does it matter which plan I have with WordPress to utilize Https:
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.
Dave says
I have all the pages secure, but the home page is not. How do I secure the home page.
Thanks!!
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.
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!
Danny says
I added the plugin as well as the Fix Non-SSL plugin and I still get the insecure data warning. Any suggestions?
Danny says
Website URL http://www.vmatter.com
Lami says
Thank you for this… you just saved my site!
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
Using this plugin, you can secure specific pages or the entire site.
Admin
Ariel Frailich says
Ah ha! Thank you!
Eric says
I cant get the errors off of my page for some reason. https://hostpuppies.com/blog/contact-us/
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.
Admin
Bill Ray says
Having secure pages is very important, especially if you are after donations.
Editorial Staff says
Anytime you are collecting payments or confidential information, then it is best to have a secure encrypted page.
Admin
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!!
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?
Editorial Staff says
Yes the UI has been updated.
Admin
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?
Editorial Staff says
We are pretty sure that the checkbox stores the value in post meta. You can insert post meta (i.e custom fields) by default.
https://www.wpbeginner.com/wp-tutorials/how-to-add-custom-fields-automatically-on-post-publish-in-wordpress/
Admin
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.
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!
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.
MarkStanwyck says
Nice
Titank says
Thanks for sharing! Keep going