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

Come risolvere i problemi comuni di SSL in WordPress (Guida per principianti)

Nota editoriale: guadagniamo una commissione dai link dei partner su WPBeginner. Le commissioni non influenzano le opinioni o le valutazioni dei nostri redattori. Per saperne di più su Processo editoriale.

Avete problemi con l’SSL sul vostro sito WordPress?

Il passaggio di un sito WordPress a SSL può talvolta causare problemi inaspettati. Se state aggiungendo un certificato SSL a un sito WordPress esistente e state riscontrando degli errori, siete nel posto giusto.

In questo articolo vi mostreremo come risolvere i problemi SSL più comuni in WordPress.

Fixing common HTTPS / SSL issues in WordPress

Che cos’è SSL/HTTPS e perché dovreste iniziare a usarlo subito?

SSL è l’abbreviazione di Secure Sockets Layers, una tecnologia di crittografia che crea una connessione sicura tra il browser dell’utente e il vostro server di hosting WordPress.

Una volta abilitato l’SSL, il sito web utilizzerà HTTPS anziché HTTP. Nel browser si vedrà anche un lucchetto o un segno di spunta accanto all’indirizzo del sito web per indicare che è sicuro.

Google Chrome Message About Secure Websites

SSL/HTTPS rende più difficile per gli hacker intercettare la connessione. Ogni sito abilitato a SSL/HTTPS riceve un certificato SSL unico a scopo di identificazione.

Se un server finge di essere in HTTPS e il suo certificato non corrisponde, la maggior parte dei browser moderni avvisa l’utente di non connettersi al sito web.

Insecure connection warning

Google incoraggia tutti i proprietari di siti web a utilizzare SSL/HTTPS per migliorare la sicurezza generale del web.

Ecco perché Chrome contrassegna come “Non sicuro” tutti i siti web privi di un certificato SSL.

Chrome HTTP not secure

L’etichetta “Non sicuro” nella barra degli indirizzi del browser dà una cattiva impressione ai clienti sulla vostra attività. Oltre a questo, è necessario abilitare SSL/HTTPS se si vuole avviare un negozio online o utilizzare servizi di pagamento come PayPal, Stripe e Authorize.net.

Considerando i pro e i contro, tutti i siti web WordPress devono passare a SSL/HTTPS.

Se non l’avete ancora fatto, potete leggere la nostra guida su come spostare correttamente WordPress da HTTP a HTTPS per avere istruzioni passo dopo passo.

Consigliato: Consultate la nostra guida su come ottenere un certificato SSL gratuito o acquistate un certificato SSL a prezzo scontato da Domain.com.

Tuttavia, potreste incorrere in alcuni errori di WordPress con il vostro certificato SSL. Vediamo quindi alcuni dei problemi più comuni con SSL/HTTPS in WordPress e come risolverli:

1. Correzione dell’errore NET::ERR_CERT_INVALID

Il messaggio di errore NET::ERR_CERT_INVALID viene visualizzato in Google Chrome. Gli altri browser visualizzano un messaggio leggermente diverso, ma fondamentalmente avverte gli utenti che la connessione al vostro sito web non è sicura.

Certificate authority invalid error

Questo messaggio di errore SSL indica che il browser web dell’utente non ha accettato il certificato presentato dal sito web. Questo può accadere per una serie di motivi:

  • Il certificato SSL viene emesso per un nome di dominio o sottodominio diverso.
  • Il certificato è scaduto.
  • Il browser non riconosce l’autorità di emissione del certificato.

Se avete acquistato un certificato SSL e avete chiesto al vostro provider di hosting WordPress di installarlo per voi, potete contattarlo per risolvere il problema.

Se il certificato SSL è stato installato manualmente, provare a reinstallarlo o contattare il fornitore del certificato SSL per assistenza.

2. Correzione degli errori di contenuto misto dopo il passaggio a SSL/HTTPS

Gli errori di contenuto misto sono causati da fonti che stanno ancora caricando utilizzando il protocollo HTTP non sicuro negli URL. Queste possono includere risorse come immagini, script o fogli di stile.

In questo caso, non sarà possibile vedere un lucchetto sicuro o l’icona “tune” nella barra degli indirizzi del sito web.

Not Secure HTTP website

Esistono due modi per risolvere gli errori di contenuto misto SSL/HTTPS in WordPress. Ve li mostriamo entrambi e poi potrete scegliere quello che funziona meglio per voi.

1. Correggere gli errori di contenuto misto in WordPress utilizzando un plugin

Questo metodo è più semplice ed è consigliato ai principianti. Tuttavia, può avere un impatto negativo sulle prestazioni di WordPress, perché il plugin tenta di risolvere gli errori di contenuto misto utilizzando una tecnica di buffering dell’output.

Tuttavia, se si utilizza un plugin di caching, l’impatto sarà solo sul primo caricamento della pagina. I visitatori che ritornano non noteranno alcuna differenza di prestazioni.

Per prima cosa, dovrete assicurarvi di avere un certificato SSL. Se non siete sicuri di averne uno, consultate la nostra guida su come ottenere un certificato SSL gratuito per il vostro sito WordPress.

Quindi, è sufficiente installare e attivare il plugin Really Simple SSL. Per maggiori dettagli, consultate la nostra guida passo-passo su come installare un plugin di WordPress.

Dopo l’attivazione, è necessario visitare la pagina Impostazioni ” SSL dalla dashboard di amministrazione di WordPress per rivedere le impostazioni del plugin. Really Simple SSL funziona subito e si occuperà automaticamente delle impostazioni SSL/HTTPS e della correzione degli errori di contenuto misto.

Really Simple SSL settings page

Per saperne di più, consultate la nostra recensione dettagliata di Really Simple SSL.

2. Correzione manuale degli errori di contenuto misto in WordPress

Questo metodo è più efficace e migliore per le prestazioni del vostro sito web. Tuttavia, richiede la risoluzione manuale dei problemi.

Innanzitutto, è necessario andare su Impostazioni ” Generali e assicurarsi che le opzioni “Indirizzo WordPress” e “Indirizzo del sito” abbiano URL HTTPS.

WordPress URL settings

Se si vedono URL che iniziano con “http”, è necessario modificarli in “https”. Non dimenticate di fare clic sul pulsante “Salva modifiche” per memorizzare le impostazioni.

Successivamente, è necessario trovare i vecchi URL HTTP nel database di WordPress e sostituirli con i nuovi URL HTTPS.

È possibile farlo facilmente installando e attivando il plugin Better Search Replace. Per maggiori dettagli, consultate la nostra guida passo-passo su come installare un plugin di WordPress.

Dopo l’attivazione, è necessario visitare la pagina Strumenti ” Sostituzione della ricerca migliore. Nel campo ‘Cerca’, è necessario aggiungere l’URL del sito web con HTTP. Successivamente, aggiungere l’URL del sito web con “https” nel campo “Sostituisci”.

Better Search Replace plugin

Il plugin aggiornerà ora gli URL nel database di WordPress.

Se si verificano ancora errori di contenuto misto, il passo successivo consiste nel risolvere i problemi relativi agli URL nei file del tema e del plugin di WordPress.

Utilizzando lo strumento di ispezione del browser, è necessario individuare le risorse che causano gli errori e prendere nota dei file del sito web da cui vengono caricati.

Using inspect tool to locate mixed content errors

Se siete esperti nella modifica dei file di WordPress, potete accedere ai file del tema utilizzando l’FTP o il file manager del vostro hosting web. È necessario modificare ciascun file e sostituire “http” con “https”.

Un’altra alternativa è contattare lo sviluppatore del tema e chiedergli di aggiornarlo. Dovranno utilizzare le migliori pratiche di WordPress per caricare i file, il che risolverà il problema HTTP/HTTPS.

Lo stesso vale per il contenuto misto caricato da un plugin di WordPress. Si sconsiglia di modificare da soli i file del plugin, pertanto è necessario informare lo sviluppatore del plugin e richiedere un aggiornamento. Nel frattempo, potete disabilitare il plugin sul vostro sito o trovare un plugin alternativo.

3. Correzione degli errori di troppi reindirizzamenti dopo il passaggio a SSL/HTTPS

WordPress consente di imporre SSL/HTTPS per l’area di amministrazione inserendo la seguente riga nel file wp-config.php:

define('FORCE_SSL_ADMIN', true);

Tuttavia, in alcuni scenari, questa sola impostazione può causare l’errore“Troppi reindirizzamenti“.

Per risolvere questo problema, è necessario aggiungere il seguente codice al file wp-config.php, subito prima della riga che dice: “Questo è tutto, smettete di modificare! Buon blog”:

define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
       $_SERVER['HTTPS']='on';

4. Correggere il reindirizzamento da HTTP a HTTPS di WordPress

WordPress non reindirizza automaticamente le richieste HTTP a HTTPS, a meno che non glielo diciate voi. Se si utilizza un plugin come Really Simple SSL, questo si occuperà dei reindirizzamenti. Altrimenti, dovrete impostare manualmente i reindirizzamenti.

Per impostare il reindirizzamento da HTTP a HTTPS, è necessario aggiungere il seguente codice al file .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

Speriamo che questo articolo vi abbia aiutato a risolvere alcuni problemi comuni con SSL/HTTPS in WordPress. Potreste anche voler consultare la nostra guida definitiva alla sicurezza di WordPress o le nostre scelte degli esperti per i migliori plugin e strumenti SEO per WordPress.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

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.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

86 commentiLascia una risposta

  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. Mrteesurez says

    Thanks for this guide.
    I thought the issue of SSL certificate not set up correctly is mostly from the hosting site one is using as most hosting offer free SSL with the hosting services.

  3. Soumyajit Bera says

    Hi. After changing my website from http to https I am not able to open my website. Please help me what to do now.
    It is showing ERR_SSL_PROTOCOL_ERROR

    • WPBeginner Support says

      For that specific error, you would want to check with your hosting provider to ensure your SSL certificate is set up on your site properly as the most common reason and they should be able to help fix this.

      Admin

  4. Marianne says

    I couldn’t access my wordpress account but I can access CPANEL> Anything I can do to update my SSL on my site so i can login?

    • WPBeginner Support says

      It would depend on the specific error you are receiving but if you are unable to log into your site we would recommend reaching out to your hosting provider and they can normally assist with SSL errors.

      Admin

  5. Macor says

    Interesting.
    Even I had everything OK in my dashboard (step 2) I needed to update database links with Better Search plugin.
    Thank you very much.

  6. MK says

    I have installed my free SSL on my domain provided by Hostgator. Its current status is active but my domain is not opening. it showing an error “might be temporarily down or it may have moved permanently to a new web address”

  7. Vivek says

    I installed ssl for my website using wordpress plugin.
    When I entered url of my website on my pc, it shows secure.
    When I enter url from other devices, it shows not secure.

    Please help me with this.
    Thank You

    • WPBeginner Support says

      If your URL is properly set in your WordPress settings, then you would want to reach out to your hosting provider to ensure there isn’t a redirect causing an issue.

      Admin

  8. Rajendra Rana says

    When I am typing http:// in browser i am getting “your connection is note private…” issue. But when I am using https:// then there is no errer. please help

  9. Antonio says

    I had a 3d engine that used shortcode, SSL made it blocked, fixing the ulr in settings made it work again, thanks for the article! absolutely no one had any idea why it was not showing up, not the host not the creator of the engine .. and it was such a simple fix.. thanks again!

  10. Ahmad Jawad Hassaan says

    it worked for me, my site already had ssl installed but, while installing wp i didnt choose https, so i went to general setttings as you have said and, changed it to https.
    Thank you.

  11. Pierre says

    chrome displays: “access to this site is not FULLY secure”

    I was thinking back to whether there were recent changes or updates.
    But all I know is that someone in our department had only just changed themes!? and that there was a recent update in WordPress
    Merci. Thanks in advance

    • WPBeginner Support says

      You may want to look at 2 in this article for the most likely culprit with your theme change.

      Admin

  12. Paul says

    Hi. I just got an ssl certificate for my website and after following the instructions on how to set it up in wordpress, i can’t login to my dashboard any longer. After entering my correct login details, the page will load and return to the login page again. Please I’ll need help fixing this.

  13. Jocie Holloway says

    I just tried enabling my SSL certificates using the Really Simple SSL plugin and now I am getting this error when I try to access my website: Error code 30
    The proxy failed to connect to the web server, no web server IP is defined. Do you have suggestions on how to fix this?

    • WPBeginner Support says

      For that, we would recommend reaching out to your hosting provider for them to take a look and they can normally assist and fix this issue.

      Admin

  14. Marco says

    Hi,

    Any idea why if I go to home page of my website is unsecured and if I press one more time is secured…Anybody knows how to fix this issue?

    • WPBeginner Support says

      You would want to reach out to your hosting provider and they can normally assist with that if it is not caching issue with your browser or site.

      Admin

  15. Maarten Corten says

    Hello,

    I recently asked my provider to turn my ( WordPress) website into https. Ever since, my website (including the wp-admin backoffice) has a very long loading time on mobile devices, a few minutes. Desktop is fine.

    Is this a typical problem? Any suggestions? Thanks in advance!

  16. nuril says

    hi dude i wanna ask…
    why when i upload themes from my directory pc, my website change to http.
    you know how to fix this?

    • WPBeginner Support says

      To start you would want to check with your hosting provider to ensure your SSL is set up properly.

      Admin

  17. Ajmal says

    My website is showing this message. How to resolve this issue? Please help!!
    This site can’t provide a secure connection ×××.com uses an unsupported protocol.
    ERR_SSL_VERSION_OR_CIPHER_MISMATCH

    • WPBeginner Support says

      You would want to reach out to your hosting provider to ensure there are no issues with your SSL certificate.

      Admin

  18. Shivam Narayan says

    Thank you so much sir. My problem of “Info/Not Secure” of SSL is solved with this Amazing Article. Thank you so much.

    Keep helping us.

  19. Przemysław says

    Thanks a lot. I did all the steps from other sources but they didn’t have more detailed stuff to search for errors. Like looking into console to find errors. Seems obvious but well. Thanks a lot!

  20. Prashant Kashyap says

    Very helpful information.
    Especially, the plugin “better search replace” helped me a lot.
    Thank you so much.

  21. anurag says

    After i activate the plugin and load the website, the page appears not secure on the first load. However, when i refresh the page, it shows the page as secure. This issue happens every time :/

  22. Imtiyaz says

    When I search my Website directly on Google it shows site not secured sign but when I search it with adding https: then it shows secured sign. So is my site secured or not , I am confused

    • WPBeginner Support says

      Google may have cached the non-https version of your site, if you’ve submitted your sitemap you can have Google recrawl your site.

      Admin

  23. Luis says

    Hi,

    Thanks for your post. I was able to fix ssl on one of my sites, however, I have another site with the woocommerce plugin and, with these steps, I couldn’t solve the problem.

    I tried to deactivate all the plugins and when I deactivate the woocommerce my site works fine.

    The problem is “too many redirects” and with this the page does not load.

    Can anyone give me some tips on how to solve the redirects issue in the woocommerce plugin?

  24. Regina says

    Hello,

    I appreciate all your guidance in this post, my truggle is taht I redirect the URLs in WP General Settings, while the status of SSL Certificate wasn’t active so now I can’t access to My WordPress administration it appears the NET::ERR_CERT_COMMON_NAME_INVALID error, so I already call my webhosting to fix the SSL Certificate issiue and it will get fixed, but now I wonder if there is a chance that I cand revert the URL to HTTP in CPANEL, so I can word on the design of my webpages…

    Please Help Me

  25. vinayak says

    Having problems opening my site on firefox and safari. I’ve installed SSL on one of my domains and the had it verified from the godaddy support team. They said that the ssl is installed fine. But my site doesn’t show the padlock on firefox and safari and sometimes it doesn’t even open.

  26. Perry says

    I did all this. Set up my SSL certificate, installed and activated Really Simple, fixed the mixed content errors (or tried to) with Better Search & Replace and SSL Insecure Content Fixer. However, most of my images are still broken or not loading. They don’t even appear in my media library. The console points to the same file causing the problem—but it’s a file that flat-out does not exist. I cannot find this file anywhere, yet somehow it’s the source of all my images being broken.

  27. Tony V says

    Hi guys, first of all, thanks for your great job sharing your knowledge with noobs like me :)

    I’ve just done all the SSL certificate stuff for the first time and got something that seems weird.On the browser that I’ve created the WordPress site and done everything, the website displays just fine . The connection appears to be fully secure and green. But when opening on any other browser or machine, it displays like rubbish. Also, here I get a “Your connection to this site is not fully secure”. When using the Inspect tool, I get 6 of those mixed content errors.

    Can you cast some light upon my ignorance, please? Thanks a lot!

    • WPBeginner Support says

      You may want to ensure you clear all caching for your site and it can take some time for the SSL to fully update

      Admin

  28. Peter says

    So.. According to #2 I changed the http to https:, so since than error 404 appears when I try to visit the site with http, if I try with https, than it tells me that this is not a secure site, and it gets blocked.
    I need a solution ASAP, please!!!!

    • WPBeginner Support says

      It sounds like your SSL isn’t active for your site, you would likely want to reach out to your hosting provider to ensure the certificate is active.

      Admin

  29. Alex says

    Are there ways to fix issues like these if you cannot access the WordPress dashboard? Very often, if there is an SSL issue, the web browser will not even let you access the login page. I would assume you should be able to manually replace links in the database without using a plugin.

    • WPBeginner Support says

      For a starting point, we recommend reaching out to your hosting provider and they can normally help with some of the issues to allow you to log in to your site.

      Admin

  30. Candace says

    I have a web site that I installed Real Simple SSL and Better Search and Replace plugins. I activated both, and ran the Better Search and Replace tool. My problem is when I go to login I get the message (The page isn’t redirecting properly An error occurred during a connection)
    This is in the most recent version of Firefox and I cleared cookies and cache.
    I also tried this in Safari and it said that “Too many redirects occurred This might occur if you open a page that is redirected to open another page which then is redirecterd to open the original page.

    What should I change or search for to get the wp-admin login page to work properly?

  31. Williams says

    I changed my WordPress Address (URL) and Site Address (URL) from HTTP to HTTPS.

    I don’t have any SSL certificate and did not make any other change…i already made the mistake before i saw your article.

    Now i cant access my domain and my website is inaccessbile and showing ERR_SSL_PROTOCOL_ERROR

    Please, what’s the solution?

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.