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

Como corrigir problemas comuns de SSL no WordPress (guia para iniciantes)

Nota editorial: Ganhamos uma comissão de links de parceiros no WPBeginner. As comissões não afetam as opiniões ou avaliações de nossos editores. Saiba mais sobre Processo editorial.

Você está enfrentando problemas de SSL em seu site WordPress?

A mudança de um site WordPress para SSL pode, às vezes, resultar em problemas inesperados. Se estiver adicionando um certificado SSL a um site WordPress existente e estiver encontrando erros, você veio ao lugar certo.

Neste artigo, mostraremos a você como corrigir os problemas mais comuns de SSL no WordPress.

Fixing common HTTPS / SSL issues in 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 sinal de cadeado ao lado do endereço do 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.

Insecure connection warning

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”.

Chrome HTTP not secure

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.

Certificate authority invalid error

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 ícone de cadeado seguro na barra de endereços do seu site.

Not secure

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.

Really Simple SSL settings page

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.

WordPress URL settings

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 Better Search Replace. 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 ” Better Search Replace. No campo “Search”, você precisa adicionar o URL do seu site com HTTP. Depois disso, adicione o URL do seu site com “https” no campo “Replace” (Substituir).

Better Search Replace plugin

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.

Using inspect tool to locate mixed content errors

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 ou nossas escolhas de especialistas para os melhores plug-ins e ferramentas de SEO para WordPress.

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.

Divulgação: Nosso conteúdo é apoiado pelo leitor. Isso significa que, se você clicar em alguns de nossos links, poderemos receber uma comissão. Veja como o WPBeginner é financiado, por que isso é importante e como você pode nos apoiar. Aqui está nosso processo editorial.

O kit de ferramentas definitivo WordPress

Obtenha acesso GRATUITO ao nosso kit de ferramentas - uma coleção de produtos e recursos relacionados ao WordPress que todo profissional deve ter!

Reader Interactions

84 ComentáriosDeixe uma resposta

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

      Administrador

  3. 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.

      Administrador

  4. 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.

  5. 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”

  6. 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.

      Administrador

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

  8. 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!

  9. 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.

  10. 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.

      Administrador

  11. 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.

  12. 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.

      Administrador

  13. 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.

      Administrador

  14. 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!

  15. 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.

      Administrador

  16. 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.

      Administrador

  17. 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.

  18. 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!

  19. Prashant Kashyap says

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

  20. 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 :/

  21. 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.

      Administrador

  22. 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?

  23. 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

  24. 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.

  25. 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.

  26. 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

      Administrador

  27. 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.

      Administrador

  28. 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.

      Administrador

  29. 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?

  30. 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?

Deixe uma resposta

Obrigado por deixar um comentário. Lembre-se de que todos os comentários são moderados de acordo com nossos política de comentários, e seu endereço de e-mail NÃO será publicado. NÃO use palavras-chave no campo do nome. Vamos ter uma conversa pessoal e significativa.