O SSL torna seu site seguro, mas muitos proprietários de sites encontram desafios inesperados ao migrar seus sites WordPress para SSL ou ao adicionar um certificado SSL a um site existente.
Ao longo dos anos em que ajudamos as pessoas com seus sites WordPress, vimos e corrigimos muitos problemas de SSL, desde avisos de conteúdo misto até problemas de login.
Este guia mostrará a você como corrigir os problemas mais comuns de SSL no WordPress.
O que é SSL/HTTPS e por que você deve começar a usá-lo imediatamente?
SSL é uma abreviação usada para Secure Sockets Layers (Camadas de soquetes seguros), uma tecnologia de criptografia que cria uma conexão segura entre o navegador do usuário e o seu servidor de hospedagem WordPress.
Depois que você ativar o SSL, seu site usará HTTPS em vez de HTTP. Você também verá um cadeado ou um sinal de “melodia” ao lado do endereço do seu site no navegador para mostrar que ele é seguro.
O SSL/HTTPS dificulta a interceptação da conexão pelos hackers. Cada site habilitado para SSL/HTTPS recebe um certificado SSL exclusivo para fins de identificação.
Se um servidor estiver apenas fingindo estar em HTTPS e seu certificado não corresponder, a maioria dos navegadores modernos advertirá o usuário contra a conexão com o site.
O Google incentiva todos os proprietários de sites a usar SSL/HTTPS para melhorar a segurança geral da Web.
É por isso que o Chrome marca todos os sites sem um certificado SSL como “Não seguro”.
O rótulo “Não seguro” na barra de endereços do navegador dá uma má impressão aos clientes sobre sua empresa. Além disso, você também precisa ter o SSL/HTTPS ativado se quiser abrir uma loja on-line ou usar serviços de pagamento como PayPal, Stripe e Authorize.net.
Considerando os prós e os contras, todos os sites WordPress precisam mudar para SSL/HTTPS.
Se ainda não tiver feito isso, leia nosso guia sobre como mover corretamente o WordPress de HTTP para HTTPS para obter instruções passo a passo.
Recomendado: Confira nosso guia sobre como obter um certificado SSL gratuito ou compre um certificado SSL com desconto no Domain.com.
No entanto, você pode encontrar alguns erros no WordPress com seu certificado SSL. Portanto, vamos dar uma olhada em alguns dos problemas comuns com SSL/HTTPS no WordPress e como corrigi-los:
1. Como corrigir o erro NET::ERR_CERT_INVALID
A mensagem de erro NET::ERR_CERT_INVALID aparece no Google Chrome. Outros navegadores exibem uma mensagem ligeiramente diferente, mas ela basicamente avisa aos usuários que a conexão deles com o seu site é insegura.
Essa mensagem de erro SSL indica que o navegador da Web do usuário não aceitou o certificado apresentado pelo site. Isso pode ocorrer devido a vários motivos:
- O certificado SSL é emitido para um nome de domínio ou subdomínio diferente.
- O certificado expirou.
- Seu navegador não reconhece a autoridade emissora do certificado.
Se você adquiriu um certificado SSL e solicitou ao provedor de hospedagem WordPress que o instalasse para você, poderá entrar em contato com ele para corrigir o problema.
Se você instalou manualmente o certificado SSL, tente reinstalá-lo ou entre em contato com o provedor do certificado SSL para obter suporte.
2. Correção de erros de conteúdo misto após a mudança para SSL/HTTPS
Os erros de conteúdo misto são causados por fontes que ainda estão sendo carregadas usando o protocolo HTTP inseguro nos URLs. Isso pode incluir recursos como imagens, scripts ou folhas de estilo.
Se esse for o caso, você não conseguirá ver um cadeado seguro ou o ícone “tune” na barra de endereços do seu site.
Há duas maneiras de corrigir erros de conteúdo misto SSL/HTTPS no WordPress. Mostraremos as duas e você poderá escolher a que funciona melhor para você.
1. Correção de erros de conteúdo misto no WordPress usando um plug-in
Esse método é mais fácil e é recomendado para iniciantes. Mas pode ter um impacto negativo no desempenho do WordPress porque o plugin tenta corrigir erros de conteúdo misto usando uma técnica de buffer de saída.
No entanto, se você estiver usando um plug-in de cache, isso afetará apenas o primeiro carregamento da página. Os visitantes que retornarem não perceberão nenhuma diferença no desempenho.
Primeiro, você precisa ter certeza de que possui um certificado SSL. Se não tiver certeza se possui um, consulte nosso guia sobre como obter um certificado SSL gratuito para seu site WordPress.
Em seguida, basta instalar e ativar o plug-in Really Simple SSL. Para obter mais detalhes, consulte nosso guia passo a passo sobre como instalar um plug-in do WordPress.
Após a ativação, você precisa visitar a página Configurações ” SSL no painel de administração do WordPress para revisar as configurações do plug-in. O Really Simple SSL funciona imediatamente e cuidará automaticamente de suas configurações de SSL/HTTPS e corrigirá erros de conteúdo misto.
Para saber mais, consulte nossa análise detalhada do Really Simple SSL.
2. Correção manual de erros de conteúdo misto no WordPress
Esse método é mais eficaz e melhor para o desempenho de seu site. No entanto, ele requer solução manual de problemas.
Primeiro, você precisa ir para Settings ” General e certificar-se de que as opções “WordPress Address” e “Site Address” tenham URLs HTTPS.
Se você vir URLs que começam com “http”, precisará alterá-los para “https”. Não se esqueça de clicar no botão “Save Changes” (Salvar alterações) para armazenar suas configurações.
Em seguida, você precisa localizar os URLs HTTP antigos no banco de dados do WordPress e substituí-los pelos novos URLs HTTPS.
Você pode fazer isso facilmente instalando e ativando o plug-in Search & Replace Everything. Para obter mais detalhes, consulte nosso guia passo a passo sobre como instalar um plug-in do WordPress.
Após a ativação, você precisa visitar a página Tools ” WP Search & Replace. No campo “Search” (Pesquisar), você precisa adicionar o URL do seu site com HTTP. Depois disso, adicione o URL do seu site com “https” no campo “Replace” (Substituir).
Em seguida, pressione o botão “Preview Search & Replace” para ver quais URLs serão substituídos e pressione o botão “Replace All” para continuar. O plug-in agora atualizará os URLs em seu banco de dados do WordPress.
Se ainda estiver vendo erros de conteúdo misto, a próxima etapa é solucionar os problemas de URLs nos arquivos de tema e plug-in do WordPress.
Usando a ferramenta Inspect do seu navegador, você precisará localizar os recursos que estão causando os erros e anotar de quais arquivos do site eles estão sendo carregados.
Se você tiver experiência em editar arquivos do WordPress, poderá acessar esses arquivos de tema usando o FTP ou o gerenciador de arquivos da sua hospedagem na Web. Você precisa editar cada arquivo e substituir “http” por “https”.
Outra alternativa é entrar em contato com o desenvolvedor do tema e pedir que ele atualize o tema. Eles precisarão usar as práticas recomendadas do WordPress para carregar arquivos, o que corrigirá o problema de HTTP/HTTPS.
O mesmo vale para o conteúdo misto carregado por um plug-in do WordPress. Não recomendamos a edição de arquivos de plug-in por conta própria, portanto, você deve notificar o desenvolvedor do plug-in e solicitar uma atualização. Enquanto isso, você pode desativar o plug-in em seu site ou encontrar um plug-in alternativo.
3. Correção dos erros de excesso de redirecionamentos após a mudança para SSL/HTTPS
O WordPress permite que você imponha SSL/HTTPS para a área de administração inserindo a seguinte linha no arquivo wp-config.php:
define('FORCE_SSL_ADMIN', true);
No entanto, em alguns cenários, essa configuração sozinha pode causar o erro“Too many redirects“.
Para corrigir isso, você precisará adicionar o seguinte código ao seu arquivo wp-config.php, logo antes da linha que diz: ‘That’s all, stop editing! Feliz 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. Como corrigir o redirecionamento de HTTP para HTTPS do WordPress
O WordPress não redirecionará automaticamente as solicitações HTTP para HTTPS, a menos que você diga a ele para fazer isso. Se você estiver usando um plug-in como o Really Simple SSL, ele cuidará dos redirecionamentos. Caso contrário, você terá que configurar manualmente os redirecionamentos.
Para configurar o redirecionamento de HTTP para HTTPS, você precisa adicionar o seguinte código ao seu arquivo .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
Esperamos que este artigo tenha ajudado você a corrigir alguns problemas comuns com SSL/HTTPS no WordPress. Talvez você também queira ver nosso guia definitivo de segurança do WordPress e nossas escolhas de especialistas dos melhores plug-ins de segurança do WordPress para proteger seu site.
Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.
Soumyajit Bera
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
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.
Administrador
Marianne
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
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.
Administrador
Amit Stephen
Thanks it really helped me
WPBeginner Support
Glad our article was helpful!
Administrador
Macor
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.
Abey
My problem was in wordpress settings>General Thank You
WPBeginner Support
Glad our guide was able to help
Administrador
MK
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”
WPBeginner Support
You would want to ensure you updated your site’s URL to be on HTTPS, we have a guide to help with doing this that you can take a look at below:
https://www.wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/
Administrador
Vivek
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
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.
Administrador
Rajendra Rana
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
WPBeginner Support
You would want to take a look at 4 in this guide for that issue.
Administrador
Antonio
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!
WPBeginner Support
Glad our guide could help you find the solution
Administrador
Real G
Nice article, helped me fix the issue in a giffy.
WPBeginner Support
Glad our guide was helpful
Administrador
Ahmad Jawad Hassaan
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.
WPBeginner Support
Glad our guide was able to help
Administrador
Pierre
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
You may want to look at 2 in this article for the most likely culprit with your theme change.
Administrador
Paul
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.
WPBeginner Support
You would want to take a look at our article below for the most common solution for that:
https://www.wpbeginner.com/wp-tutorials/how-to-fix-wordpress-login-page-refreshing-and-redirecting-issue/
Administrador
Jocie Holloway
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
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.
Administrador
Marco
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
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.
Administrador
Maarten Corten
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!
WPBeginner Support
There are a few possibilities, for getting started we would recommend going through our speed recommendations below:
https://www.wpbeginner.com/wordpress-performance-speed/
Administrador
nuril
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
To start you would want to check with your hosting provider to ensure your SSL is set up properly.
Administrador
Ajmal
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
You would want to reach out to your hosting provider to ensure there are no issues with your SSL certificate.
Administrador
Shivam Narayan
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.
WPBeginner Support
You’re welcome, glad our guide could help you solve this issue
Administrador
Gord Wait
Brilliant! Not often you run into a tutorial that just does exactly what it says!
Site now secured!
WPBeginner Support
Glad our guide could help you
Administrador
Przemysław
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!
WPBeginner Support
Glad our article was helpful
Administrador
Muhammad hamza
My issue is solve
Thank u so much
wpbeginner.com
WPBeginner Support
Glad our guide was able to help
Administrador
Elisha
Amazing, thank you so much!
WPBeginner Support
You’re welcome, glad our guide could be helpful
Administrador
Prashant Kashyap
Very helpful information.
Especially, the plugin “better search replace” helped me a lot.
Thank you so much.
WPBeginner Support
You’re welcome, glad you found our recommendations helpful
Administrador
anurag
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 :/
WPBeginner Support
You may want to ensure you’ve cleared all caching on your site. If you are not sure if you’ve cleared your cache, you would want to take a look at our article here: https://www.wpbeginner.com/beginners-guide/how-to-clear-your-cache-in-wordpress/
Administrador
Johanna
Life saving tips, thank you so much!
WPBeginner Support
You’re welcome
Administrador
Imtiyaz
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
Google may have cached the non-https version of your site, if you’ve submitted your sitemap you can have Google recrawl your site.
Administrador
john
It worked for me. Deeply appreciated.
WPBeginner Support
Glad our recommendations were helpful
Administrador
Luis
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?
WPBeginner Support
For the too many redirects error, you would want to take a look at our guide here: https://www.wpbeginner.com/wp-tutorials/how-to-fix-error-too-many-redirects-issue-in-wordpress/
Administrador
Andres
Hi , it worked for me , Thank you.
WPBeginner Support
Glad our article could help
Administrador
Regina
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
WPBeginner Support
If you don’t want to wait for the SSL certificate to be active, you would go into your phpMyAdmin and edit your Options table to revert the site url and home url. https://www.wpbeginner.com/beginners-guide/beginners-guide-to-wordpress-database-management-with-phpmyadmin/
Administrador
vinayak
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.
WPBeginner Support
Your browser may have cached the pre SSL address which could be the cause of your issue.
Administrador
Perry
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.
WPBeginner Support
You may want to try the troubleshooting steps in our guide here: https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-http-image-upload-error-in-wordpress/
Administrador
Bongani Ngcobo
The Better Search Replace did the magic thanks, guys.
WPBeginner Support
Glad our recommendation could help
Administrador
Tony V
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
You may want to ensure you clear all caching for your site and it can take some time for the SSL to fully update
Administrador
Peter
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
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.
Administrador
Aditya
This sorted me out on my site Thanks ever so much!
WPBeginner Support
Glad our guide could help
Administrador
Daniel
Helpful. You guys keep up the good work.
WPBeginner Support
Glad our article could help
Administrador
Alex
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
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.
Administrador
Candace
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?
WPBeginner Support
You could start by trying the solutions in our article here: https://www.wpbeginner.com/wp-tutorials/how-to-fix-error-too-many-redirects-issue-in-wordpress/
for fixing the redirects, if those don’t work you may want to try the troubleshooting steps in our article: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Administrador
Williams
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?
WPBeginner Support
You would want to go into your database in the options table as one option to set the addresses back: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-wordpress-database-management-with-phpmyadmin/
Or you can add code to to your wp-config file to change the address, the required code can be found in our article here: https://www.wpbeginner.com/wp-tutorials/how-to-fix-wordpress-login-page-refreshing-and-redirecting-issue/
Administrador
judywilson
Thank you.
WPBeginner Support
Glad our article was helpful
Administrador