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

Så här fixar du vanliga SSL-problem i WordPress (Beginner’s Guide)

Runar du på SSL issues på din website i WordPress?

Att flytta en WordPress site till SSL kan ibland resultera i oväntade issues. Om du lägger till ett SSL-certifikat på en befintlig WordPress site och runar på error, då har du kommit till rätt ställe.

I den här artikeln kommer vi att visa dig hur du fixar de vanligaste SSL-problemen i WordPress.

Fixing common HTTPS / SSL issues in WordPress

Vad är SSL/HTTPS och varför ska du börja använda det direkt?

SSL är en förkortning som används för Secure Sockets Layers, en krypteringsteknik som skapar en säker anslutning mellan användarens webbläsare och din WordPress webbhotell server.

När du har aktiverat SSL kommer din website att använda HTTPS istället för HTTP. You will also see a padlock or ”tune” sign next to your website address in the browser to show that it is secure.

Google Chrome Message About Secure Websites

SSL/HTTPS gör det svårare för hackare att tjuvlyssna på anslutningen. Varje SSL/HTTPS-aktiverad site får ett unikt SSL-certifikat issue för identifiering.

Om en server bara låtsas vara på HTTPS och dess certifikat inte matchar, kommer de flesta moderna webbläsare att varna användaren från att ansluta till webbplatsen.

Insecure connection warning

Google uppmuntrar alla ägare av websites att använda SSL/HTTPS i order att förbättra den övergripande säkerheten på webben.

Det är därför Chrome markerar alla websites utan SSL-certifikat som ”Ej säkra”.

Chrome HTTP not secure

Etiketten ”Not secure” i webbläsarens adressfält ger dina kunder ett dåligt intryck av ditt företag. Notis: Du behöver också aktivera SSL/HTTPS om du vill starta en butik på nätet eller använda betaltjänster som PayPal, Stripe och Authorize.net.

Med tanke på för- och nackdelar måste all WordPress websites byta till SSL/HTTPS.

Om du inte redan har gjort det, kan du läsa vår guide om hur du flyttar WordPress från HTTP till HTTPS för steg-för-steg-instruktioner.

Rekommenderas: Kontrollera vår guide om hur du får ett gratis SSL-certifikat eller köp ett SSL-certifikat till rabatterat pris från Domain.com.

Du kan dock runna på några WordPress error med ditt SSL-certifikat. Så låt oss ta en titt på några av de vanligaste issues med SSL/HTTPS i WordPress och hur du fixar dem:

1. Fixa felet NET::ERR_CERT_INVALID

NET::ERR_CERT_INVALID error message visas i Google Chrome. Andra webbläsare visar ett något annorlunda message, men det varnar i princip användarna för att deras anslutning till din website är osäker.

Certificate authority invalid error

Detta SSL error message indikerar att användarens web browser inte godkände det certifikat som presenterades av websiten. Detta kan hända av flera olika anledningar:

  • SSL-certifikatet är issue till ett annat domain name eller subdomain.
  • Certifikatet har löpt ut.
  • Din webbläsare auktoriserar inte den certifikatutfärdande myndigheten.

Om du köpte ett SSL-certifikat och bad din WordPress hosting provider att installera det åt dig, kan du kontakta dem för att fixa det åt dig.

Om du installerade SSL-certifikatet manuellt kan du försöka installera om det eller kontakta din provider för support for SSL-certifikat.

2. Fixa mixed content error efter övergång till SSL/HTTPS

Mixed content errors orsakas av källor som fortfarande hämtar med hjälp av det osäkra HTTP-protokollet i URL:erna. Dessa kan innehålla resurser som images, skript eller stylesheets.

Om så är fallet kommer du ej att kunna se ett säkert hänglås eller en ”tune”-icon i adressfältet på din website.

Not Secure HTTP website

Det finns två sätt att fixa SSL/HTTPS mixed content error i WordPress. Vi kommer att visa dig dem båda, och sedan kan du välja det som fungerar bäst för dig.

1. Fixa mixed content error i WordPress med hjälp av ett plugin

Den här metoden är enklare och rekommenderas för Beginnare. Men det kan ha en negativ inverkan på din WordPress-prestanda eftersom tillägget försöker fixa mixed content error genom att använda en utgångsbuffringsteknik.

Men om du använder ett plugin för caching kommer det bara att påverka den första page-laddningen. Återkommande besökare kommer inte att notera någon skillnad i prestanda.

Först måste du se till att du har ett SSL-certifikat. Om du ej är säker på om du har ett, se vår guide om hur du skaffar ett gratis SSL-certifikat för din website i WordPress.

Sedan är det bara att installera och aktivera Really Simple SSL plugin. För mer detaljer, vänligen se vår Step-by-Step guide om hur man installerar ett plugin för WordPress.

Efter aktivering måste du besöka Settings ” SSL page från din WordPress adminpanel för att reviewer plugin-inställningarna. Really Simple SSL fungerar direkt ur boxen och kommer automatiskt att ta hand om dina SSL/HTTPS-inställningar och fixa mixed content error.

Really Simple SSL settings page

För att lära dig mer, se vår detaljerade Really Simple SSL review.

2. Manuellt Fixa Mixed Content Error i WordPress

Den här metoden är mer effektiv och bättre för din websites prestanda. Det kräver dock manuell felsökning.

Först måste du gå till Settings ” Allmänt och se till att alternativen ”WordPress Address” och ”Site Address” har HTTPS URL:er.

WordPress URL settings

Om du ser URL:er som börjar med ”http” måste du gå vidare och ändra dem till ”https”. Glöm inte att klicka på knappen ”Save Changes” för att spara dina inställningar.

Därefter måste du hitta de gamla HTTP-URL:erna i din WordPress database och ersätta dem med de new HTTPS-URL:erna.

Du kan enkelt göra det genom att installera och aktivera pluginet Search & Replace Everything. För mer detaljer, se vår Step-by-Step guide om hur du installerar ett WordPress plugin.

Efter aktivering måste du besöka Tools ” WP Search & Replace page. I fältet ”Search” måste du add to din website URL med HTTP. Efter det, add your website URL with ’https’ in the ’Replace’ field.

Add URLs into the search and replace fields

Tryck sedan på knappen ”Preview Search & Replace” för att se vilka URL:er som kommer att ersättas, och tryck på knappen ”Replace All” för att fortsätta. Pluginet kommer nu att update URL:er i din WordPress database.

Om du fortfarande ser mixed content error, är nästa steg att troubleshoota URL:er i dina WordPress theme- och plugin-filer.

Med hjälp av webbläsarens inspektionsverktyg måste du lokalisera de resurser som orsakar error och obs/observera vilka website-filer de hämtar från.

Using inspect tool to locate mixed content errors

Om du har erfarenhet av att editera WordPress-filer kan du komma åt dessa theme-filer med FTP eller filhanteraren på ditt webbhotell. You need to edit each file and replace ”http” with ”https”.

Ett annat alternativ är att kontakta utvecklaren av temat och be dem att updating sitt theme. De kommer att behöva använda WordPress bästa praxis för att hämta filer, vilket kommer att fixa HTTP/HTTPS-problemet.

Detsamma gäller för blandat content som hämtar från ett WordPress plugin. Vi rekommenderar inte att du själv editerar plugin-filer, så du bör meddela plugin-utvecklaren och requesta en update. Under tiden kan du inaktivera pluginet på din site eller hitta ett alternativt plugin.

3. Fixa error med för många redirects efter övergång till SSL/HTTPS

WordPress tillåter dig att genomdriva SSL/HTTPS för admin area genom att enter följande rad i din wp-config.php-fil:

define('FORCE_SSL_ADMIN', true);

I vissa scenarier kan dock enbart den här inställningen orsaka error:n ”Too many redirects”.

För att fixa detta måste du add to följande kod till din wp-config.php-fil precis innan raden som säger, ”That’s all, stop editing! Trevlig bloggning.”:

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. Fixa WordPress HTTP till HTTPS Redirect

WordPress kommer ej automatiskt att redirecta HTTP requests till HTTPS om du inte säger till den att göra det. Om du använder ett plugin som Really Simple SSL, kommer det att ta hand om redirects. Annars måste du manuellt konfigurera redirects.

För att ställa in HTTP till HTTPS redirect måste du add to följande kod till din .htaccess-fil:

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

Vi hoppas att den här artikeln hjälpte dig att fixa några vanliga issues med SSL/HTTPS i WordPress. Du kanske också vill se vår ultimata guide till säkerhet i WordPress eller våra expertval för de bästa tilläggen och tools för sökmotorsoptimering i WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

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.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

89 kommentarerLämna ett svar

  1. Syed Balkhi

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

    Well I’ll be honest, I have never experienced a SSL issue before, but I’m bookmarking this page so I can refer back to it when I face an error in the future.
    Thank you for this!

  3. Jiří Vaněk

    The biggest problems I’ve always had to deal with were mixed content issues on the website. The Really Simple SSL plugin is really great for this problem, especially for beginners starting with WordPress. For others, it’s better to use Phpmyadmin and fix the data directly in the database. Otherwise, what do you think is better, redirecting WordPress to https through the administration or through the .htaccess file? In my opinion, using .htaccess will be better in terms of speed.

    • WPBeginner Support

      There is no specifically better option, it would depend on which a user is most comfortable with :)

      Administratör

  4. Mrteesurez

    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.

    • WPBeginner Support

      Glad we could share some of the other possible reasons and issues :)

      Administratör

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

      Administratör

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

      Administratör

  7. Amit Stephen

    Thanks it really helped me

    • WPBeginner Support

      Glad our article was helpful!

      Administratör

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

  9. Abey

    My problem was in wordpress settings>General Thank You

    • WPBeginner Support

      Glad our guide was able to help :)

      Administratör

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

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

      Administratör

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

      Administratör

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

      Administratör

  14. Real G

    Nice article, helped me fix the issue in a giffy.

    • WPBeginner Support

      Glad our guide was helpful :)

      Administratör

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

      Administratör

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

      Administratör

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

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

      Administratör

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

      Administratör

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

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

      Administratör

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

      Administratör

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

      Administratör

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

      Administratör

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

      Administratör

  26. Muhammad hamza

    My issue is solve
    Thank u so much
    wpbeginner.com

    • WPBeginner Support

      Glad our guide was able to help :)

      Administratör

  27. Elisha

    Amazing, thank you so much!

    • WPBeginner Support

      You’re welcome, glad our guide could be helpful :)

      Administratör

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

      Administratör

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

  30. Johanna

    Life saving tips, thank you so much!

    • WPBeginner Support

      You’re welcome :)

      Administratör

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

      Administratör

  32. john

    It worked for me. Deeply appreciated.

    • WPBeginner Support

      Glad our recommendations were helpful :)

      Administratör

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

  34. Andres

    Hi , it worked for me , Thank you.

    • WPBeginner Support

      Glad our article could help :)

      Administratör

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

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

      Administratör

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

  38. Bongani Ngcobo

    The Better Search Replace did the magic thanks, guys.

    • WPBeginner Support

      Glad our recommendation could help :)

      Administratör

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

      Administratör

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

      Administratör

  41. Aditya

    This sorted me out on my site Thanks ever so much!

    • WPBeginner Support

      Glad our guide could help :)

      Administratör

  42. Daniel

    Helpful. You guys keep up the good work.

    • WPBeginner Support

      Glad our article could help :)

      Administratör

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

      Administratör

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

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

  46. judywilson

    Thank you.

    • WPBeginner Support

      Glad our article was helpful :)

      Administratör

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.