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 flyttar du WordPress från HTTP till HTTPS på rätt sätt (Beginner’s Guide)

Är du intresserad av att flytta WordPress från HTTP till HTTPS och installera ett SSL-certifikat på din website?

Vi har fått många requests i det här ämnet eftersom Google redan i juli 2018 meddelade att webbläsaren Chrome skulle markera alla webbplatser utan SSL som osäkra.

I den här artikeln visar vi hur du flyttar WordPress från HTTP till HTTPS på rätt sätt genom att lägga till ett SSL-certifikat.

Moving WordPress from HTTP to HTTPS / SSL

Oroa dig inte om du inte har någon aning om vad SSL eller HTTPS är. Vi kommer att förklara det också.

Vad är HTTPS?

HTTPS eller Secure HTTP är en krypteringsmetod som säkrar anslutningen mellan användarnas webbläsare och din server. Detta gör det svårare för hackare att tjuvlyssna på anslutningen.

Varje dag delar vi vår personliga information med olika websites, om vi gör ett köp eller bara loggar in.

För att skydda dataöverföringen måste en säker anslutning skapas.

Det är då SSL och HTTPS kommer in i bilden.

Varje site issue ett unikt SSL-certifikat för identifieringssyften. Om en server utger sig för att vara på HTTPS och certifikatet inte matchar, varnar de flesta moderna webbläsare användaren från att ansluta till webbplatsen.

Connection not private error in Google Chrome

Nu undrar du säkert varför jag behöver flytta min WordPress site från HTTP till HTTPS, särskilt om det är en enkel blogg eller en webbplats för småföretag som inte tar emot några betalningar.

Varför behöver du HTTPS och SSL?

Under 2018 tillkännagav Google en plan för att förbättra den övergripande webbsäkerheten genom att uppmuntra ägare av websites att byta från HTTP till HTTPS. Som en del av denna plan skulle deras populära web browser Chrome markera alla websites utan SSL-certifikat som ”Not Secure”.

Connection not secure

Google sa också att webbplatser med SSL också kommer att se sökmotorsoptimering och få högre ranking än osäkra webbplatser. Sedan dess har ett stort antal websites bytt från HTTP till HTTPS.

Efter tillkännagivandet började Google rulla ut ”Not Secure”-varningen i Chrome. Om någon till exempel besöker en HTTP website med inkognitofönstret kommer den att markeras som ”Not Secure”. Om någon besöker en HTTP-webbplats i vanligt läge och försöker fylla i ett kontaktformulär eller ett annat formulär, kommer webbplatsen att markeras som osäker.

När dina läsare och customers ser detta notice ger det dem ett dåligt intryck av ditt företag.

Det är därför alla websites måste gå från HTTP till HTTPS och installera SSL omedelbart.

Eller ej, om du vill godkänna betalningar online på din website för ecommerce behöver du SSL.

De flesta betalningsföretag, gillar Stripe, PayPal Pro, Authorize.net, etc., kommer att kräva en säker anslutning innan de godkänner betalningar.

Vi använder SSL för våra websites, inklusive WPBeginner, OptinMonster, WPForms och MonsterInsights.

Obligatoriska krav för användning av HTTPS/SSL på en site i WordPress

Kraven för att använda SSL i WordPress är ej särskilt höga. Allt du behöver göra är att köpa ett SSL-certifikat, och du kanske redan har det gratis.

De bästa företagen för webbhotell WordPress erbjuder gratis SSL-certifikat för alla sina användare:

För mer detaljer, se vår guide om hur du skaffar ett gratis SSL-certifikat för din website i WordPress.

Om ditt webbhotell ej erbjuder ett gratis SSL-certifikat måste du köpa ett SSL-certifikat.

Vi rekommenderar att du använder Domain.com eftersom de erbjuder det bästa SSL-erbjudandet för både vanliga SSL-certifikat och wildcard SSL-certifikat.

Genom att köpa ett SSL-certifikat från dem får du också en TrustLogo-sigill för din webbplats, och varje SSL-certifikat har en säkerhetsgaranti på minst 10 000 USD. Priserna börjar kl. 33 USD per år och SSL-certifikat förnyas automatiskt.

När du har köpt ett SSL-certifikat måste du be din hosting provider att installera det åt dig.

Settings för användning av SSL och HTTPS i WordPress

När du har aktiverat ett SSL-certifikat för ditt domain name måste du ställa in WordPress så att SSL- och HTTP-protokoll används på din website.

Vi kommer att visa dig två metoder för att göra det, och du kan välja den som bäst passar dina behov.

Video Tutorial

Subscribe to WPBeginner

Om du föredrar skriftliga instruktioner är det bara att fortsätta läsa

Metod 1: Konfigurera SSL/HTTPS i WordPress med hjälp av ett tillägg

Denna metod är enklare och rekommenderas för Beginnare.

Först måste du installera och aktivera pluginet Really Simple SSL. För mer detaljer, se vår Step-by-Step guide om hur du installerar ett plugin för WordPress.

När du är aktiverad måste du besöka Settings ” SSL page. Pluginet kommer automatiskt att upptäcka ditt SSL-certifikat och ställa in din WordPress site så att den använder HTTPS.

SSL enabled on a WordPress website

Tillägget kommer att ta hand om allt, inklusive error med blandat content. Här är vad pluginet gör bakom kulisserna:

  • Kontrollera SSL-certifikat
  • Ställ in WordPress att använda https i URL:er
  • Konfigurera redirects från HTTP till HTTPS
  • Leta efter URL:er i ditt content som fortfarande hämtar från osäkra HTTP-källor och försök fixa dem.

Note: Pluginet försöker fixa error med blandat content genom att använda teknik för buffring av utdata. Det kan ha en negativ prestandapåverkan eftersom det ersätter content på webbplatsen när sidan hämmas. Denna påverkan ses endast på första sidans laddning, och den bör vara minimalistisk om du använder ett plugin för caching.

Medan pluginet säger att du kan behålla SSL och säkert deactivate pluginet, är det inte 100% sant. Du måste lämna pluginet aktivt all tid eftersom deactivate av pluginet kommer att ge tillbaka mixed content error. Se vår Really Simple SSL review för mer detaljer.

Metod 2: Ställ in SSL/HTTPS i WordPress manuellt

Den här metoden är obligatorisk för att du ska kunna troubleshoota manuellt och edit WordPress filer. Det är dock en permanent och mer prestandaoptimerad lösning, och vi använder den på WPBeginner.

Om du tycker att den här metoden är svår kan du anlita en WordPress utvecklare eller använda den första metoden istället.

Som en del av denna metod kan du behöva edit WordPress tema och kodfiler. Om du inte har gjort detta tidigare, se vår guide om hur du copy and paste code snippets i WordPress.

Först måste du gå till Settings ” General page. Härifrån måste du updating dina WordPress och site URL adressfält genom att ersätta http med https.

Update WordPress URLs

Glöm inte att klicka på knappen ”Save changes” för att spara dina settings.

När Settings har sparats kommer WordPress att logga ut dig och du kommer att bli ombedd att logga in på nytt.

Följaktligen måste du ställa in WordPress redirect från HTTP till HTTPS genom att lägga till följande kod i din .htaccess-fil:

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

Om du använder NGINX-servrar måste du add to följande kod för att redirecta från HTTP till HTTPS i din konfigurationsfil:

server {
listen 80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;
}

Glöm inte att ersätta example.com med ditt domain name.

Genom att följa dessa steg kommer du att undvika WordPress HTTPS fungerar inte error eftersom WordPress nu kommer att ladda hela din website med HTTPS.

Om du vill tvinga SSL och HTTPS på din WordPress admin area eller login pages, måste du konfigurera SSL i wp-config.php-filen.

Add to följande kod ovanför raden ”That’s all, stop editing!” i filen wp-config.php:

define('FORCE_SSL_ADMIN', true);

Denna rad allow WordPress att tvinga SSL / HTTPs i WordPress admin area. Det fungerar också på WordPress multisite networks.

När du har gjort detta är din website helt inställd på att använda SSL/HTTPS, men du kommer fortfarande att stöta på mixed content error.

Dessa error orsakas av att källor (images, scripts eller stylesheets) fortfarande hämtar med det osäkra HTTP-protokollet i URL:erna. Om så är fallet kommer du ej att kunna se en säker hänglåsicon i adressfältet på din website.

Not secure

Många moderna webbläsare blockerar automatiskt osäkra skript och resurser.

You may see a padlock icon but with a notification about it in your browser’s address bar.

Insecure content blocked

You can find out which content is served through insecure protocol by using the Inspect tool.

Error med blandat content kommer att visas som en varning i konsolen med details för varje objekt med blandat content.

Mixed content errors displayed in browser console

You will notice that most URLs are images, iframes, and image galleries, while some are scripts and stylesheets loaded by your WordPress plugins and themes.

Fixa blandat content i WordPress Database

Majoriteten av de felaktiga URL:erna kommer att vara images, filer, embeds och andra data som är lagrade i din WordPress database. Låt oss fixa dem först.

Du måste hitta alla omnämnanden av din gamla website URL i databasen som börjar med http och ersätta dem med din new website URL som börjar med https.

Du kan enkelt göra detta 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. Under fältet ”Search” måste du add to din website URL med http. Efter det, add your website URL with https under ”Replace” fältet.

Add URLs into the search and replace fields

Under det ser du alla dina WordPress Database Tables. Du måste välja dem alla för att köra en grundlig kontroll.

Select all tables in Search & Replace Everything

Klicka sedan på knappen ’Preview Search & Replace’ för att se alla ändringar som pluginet kommer att göra. Slutligen klickar du på knappen ”Replace All”.

Click the Replace All button

Pluginet kommer nu att searcha din WordPress database efter URL:er som börjar med http och ersätta dem med säkra https-URL:er. Det kan ta ett tag, beroende på storleken på din WordPress database.

Fixa error med blandat content i WordPress Theme

En annan vanlig orsak till mixed content error är your WordPress theme. Alla anständiga WordPress-teman som följer WordPress kodningsstandarder kommer ej att orsaka denna issue.

Först måste du använda din webbläsares inspektionsverktyg för att hitta resurserna och var de hämtas från.

Using inspect tool to find mixed content error

Därefter måste du hitta dem i ditt WordPress theme och ersätta dem med https. Detta kommer att vara lite svårt för de flesta Beginnare, eftersom du ej kommer att kunna se vilka theme-filer som innehåller dessa URL:er.

Fixa mixed content error som orsakas av tillägg

Vissa resurser med blandat innehåll kommer att hämtas av tillägg till WordPress. Alla WordPress tillägg som följer WordPress kodningsstandarder kommer ej att orsaka mixed content error.

Vi rekommenderar inte att du editerar filer för WordPress tillägg. Istället bör du kontakta plugin-författaren och meddela dem. Om de inte svarar eller ej kan fixa det, bör du hitta ett lämpligt alternativ.

Obs/observera: Om du av någon anledning fortfarande stöter på ett mixed content error, rekommenderar vi att du tillfälligt använder tillägget Really Simple SSL så att dina användare ej påverkas medan du fixar problemet på en staging website eller anlitar en utvecklare.

Submit your HTTPS site to Google Search Console (Skicka in din HTTPS site till Google Search Console)

Search engines som Google tycker att https och http är två olika websites. För att undvika eventuella sökmotorsoptimeringar måste du meddela Google att din website har flyttats.

För att göra det behöver du bara gå till ditt Google Search Console-konto och klicka på knappen ”Lägg till en fastighet”.

Add property

Detta kommer att visa en popup där du måste add your website’s new https address.

Det finns två metoder för att verifiera en site: domain name eller URL-prefix. Vi rekommenderar metoden med URL-prefix eftersom den är mer flexibel.

Add website URL in Google Search Console

Efter det kommer Google att be dig att kontrollera äganderätten till din website.

Det finns flera sätt att göra det på. Select någon metod, och du kommer att få instruktioner för att kontrollera din webbplats. Vi rekommenderar att du använder metoden med HTML-taggar.

HTML tag method to verify your site

Du kommer nu att se ett HTML code snippet som du måste add till head section på din WordPress website.

Add to Search Console verifieringskod med All in One SEO

Först installerar och aktiverar du pluginet All in One SEO för WordPress. För mer detaljer, se vår tutorial om hur du installerar ett plugin för WordPress.

Note: Det finns också en gratis version av All in One SEO som du kan prova.

Efter aktivering, gå till All in One SEO ” Allmänna Settings page och klicka på Google Search Console.

Add Google Search Console verification code in All in One SEO

Under det måste du add to verifieringskoden som du kopierade tidigare från Google Search Console website.

Glöm inte att klicka på knappen ”Save Changes” för att spara dina inställningar.

Gå sedan tillbaka till tabben Google Search Console och klicka på knappen ”Verify”.

Verify ownership

När din site har kontrollerats kommer Google att visa dina rapporter från Search Console här.

Du måste också se till att både https- och http-versionerna läggs till i din Search Console.

Detta talar om för Google att du vill att https-versionen av din website ska behandlas som den primära versionen. I kombination med de 301 redirects som du ställde in tidigare kommer Google att överföra din ranking till https-versionen av din website, och du kommer troligen att se förbättringar i din ranking.

Vi hoppas att den här artikeln hjälpte dig att add to HTTPS och SSL i WordPress. You may also want to see our ultimate WordPress security guide with step-by-step instructions to keep your WordPress site secure or our expert picks of the best analytics solutions for 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

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

    This article is a little bit trap for newbie because if you first change to https in your wp panel and then try to add those codelines to right files you can’t reach your webiste or wp admin panel. (443 error) I had to edit files through ftp and made myself fool at work for making such a mistake. So first you have to get the certificates and edit htaccess file etcetc and then add that S in your wp admin panel (or directly edit thorugh ftp).

    • Daryl

      Thanks for heads up ! good article

  3. Huseyn

    Hi! Thank you for this article. Very useful!

    But I was faced with one problem. After installing SSL (I use free version of Cloudflare SSL) I cannot edit any pages/posts/products. Does anybody face with such problem? And how did you solve it?

    Thanks in advance!

  4. Michael Penner

    Thank you for the excellent and easy to understand article about WordPress and SSL. I was pleasantly surprised to see it was from one of my favorite plugin authors. Cheers!

  5. Maurizio Mau

    Hi and many thanks for post,
    i have implemented SSL, run good on all bowser included mobile, load in 1.5 sec, console upgraded, analitucs upgraded, redirect done, fixed all element but ranking drop approx 20% and above…

  6. Onis Egwu

    Hello There,

    Wonderful article. The issue I have with using the .htaccess file to route through https is that whenever WordPress updates, it cleans off the edits done.

    Is there a way to avoid this?

  7. max

    hi there,
    i saw your post and is interesting..but i can’t understand one thing… I read you article and i made all about it … in admin area is ok all is https..

    but the front end no .. i mean when i see the site with chrome the padlock appear and then disappear ???!??!?!

    any ideas?

    • Hardy

      I am having the same issue. :/

  8. Swapan Kumar Manna

    Hello,

    I’ve purchased an SSL certificate form Godaddy and it is approved and downloaded the .crt file. I’m bit confused what are the next steps to install the file in the server and how to redirect all the URLs in the existing WordPress site. Can anyone give me the detailed guide step by step.

    Also requesting WPBeginer to write an article on this topic ”How to install SSL certificate in Godaddy.

    Thanks.

    • Cathy Larkin

      did you fix your issue? I am getting ready to do this. I thought GD did it for you?

  9. Rohit

    Hi, as you said I went to my wordpress blog settings page and changed my domain url to https from http and clicked save however Now I am not able to login to my wordpress dashboard and getting 404 error.

    How can I solve this please becuase I cannot even login to my wordpress dashboard to change it back to http again

  10. Abhay

    Hello sir, I want to know why you are not using https on wpbeginner?

    • WPBeginner Support

      Hi Abhay,

      We don’t use HTTPS because we don’t collect any secure data. We do plan to change as our needs will change in the near future.

      Administratör

  11. Pat B

    Fantastically clear and helpful instructions. Many thanks!

  12. Brody James

    Hi,

    This worked great after following your steps. However, I notice that a few pages i.e. contact page does not display the green SSL lock but still displays https://

    How do I fix this?

    Thanks
    BJ

  13. Vaggelis

    That really rocked!!! Thank you so much. The https rocks :-) :-) :-)

  14. Esther

    Thanks so much for this.

  15. Amin

    all SSL redirections have problems with cookies didn’t found a solution from a year now. can someone help ? plz ? there is a big problem on auth cookies .. and got redirect to reauth=1
    there is no synch of cookies between front and backend , and authors get disconnected when they upload files .. I think it’s related to root/wp-load.php and /wp-admin/async-apload.php

  16. Amritosh Pandey

    Please try this –

    # BEGIN WordPress

    RewriteEngine On
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule (.*) https://{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    • Joe

      This Worked for me in my .htaccess file, all I needed to do was to change the port to ”80”

      The htaccess snippet in the post just refused to work.
      thanks for this.

  17. Amy

    Hi, just wanted to let you know I added Let’s Encrypt to my site and changed it in my WordPress dashboard it automagically updated the LOGIN page. I didn’t need to add the code to the wpconfig.php file.

    I wonder if this is a new addition to WordPress?

  18. Meenakshi

    Hi,
    I recently moved my WP site from WP’s free hosting to another hosting site, the issue I’m facing is with SSL. Any help from here is appreciated?

    • Daniel

      What issues are you having?

  19. sujith

    Hi , after converting to https i am getting error like

    ”You do not have sufficient permissions to access this page” in wp-admin

    Not able to access wp-admin.

    When i revert the changes its working fine.

    Can anybody please help

  20. Bruce

    My website is redirecting under
    https to a different website and I cannot find where the redirect is.

    Any ideas as to where to look would be appreciated.

    I have tested the plugins by disabling them.
    I have tested the themes by changing themes.
    I have looked at the htaccess.

    All works well except under https where it redirects to one of my other sites.

    Any help appreciated.

  21. Rrich

    Hi,

    I changed the wordpress and site address at the General settings tab at wordpress from http to https. And I can’t access my site again.

    I now get your site is insecure when Ii type in he url.

    I can’t even access the admin.

    Please help

    • Karl D.

      Don’t know if you got this fixed, but you can go into mysql (phpMyAdmin) and look for the table wp-options. There you will find a table entry titled ”siteurl” and one titled ”home” you can remove the s from https in the url there and your site will come back. I would make sure that you have the .htaccess and wp-config edited like stated in this article first and upload them to your site first and check if things work from there. If not, reset the .htaccess and wp-config file and edit the mysql like stated above and your site will come back when accessed without the https.

      Good luck!

      Best,
      Karl D.

      • Kalle

        Thanks Karl ! This worked ! I just edited the files in (phpMyAdmin) !
        So if you mess with http / https settings with your wP try this !

        I tried to edit my .httaccess file for 2-3 hours….. :-o

  22. Moty

    After activation and change force admin ti https can’t login- Page Not found 401
    can you please let me know how can I revert the changes?
    thanks

    • Moty

      I have erased the plugin via file manager,
      Now can login to my wp admin but still can’t get into the plugins panel VIA Wp ,
      it is asking for an https address
      Please help
      Thanks

  23. Naeem Hussain

    Dear Sir WPbeginner,

    I installed SSL + dedicated IP Certificate to my Wp Website name computerpakistan.com. Now its everything working fine, But problem with my website page speed.

    Before SSL Speed
    1.8 seconds
    After SSL Installation site page Speed
    4.3 Secondes by gtmatrix report

  24. Ritesh

    I am not able to access the admin area after I uploaded define(’FORCE_SSL_ADMIN’, true); to wp-config.php. My site was already using wordpress https plugin with force ssl administration checked in. I removed that plugin using ftp but I am still not able to login. It says incorrect username or password. However neither the password nor the username has been changed. I think this was the problem after I tried adding define(’FORCE_SSL_ADMIN’, true); to wp-config.php. I can see the login page on https version of the site but not able to login. Please guide further.

    • Ritesh

      Its absolutely blank page and nothing else.

      • The Platypus

        I’m hopeful you ran a back up before doing any changes to your site.. in either case revert back your site to an earlier state via your database, and whatever back up of your config.php file you have.

    • Florin

      I’m having the same problem. I checked everything but I still cannot login in my admin area.

      • Stephen

        I had a similar problem after enabling FORCE_SSL_ADMIN in wp-config.php.

        The login page etc. was coming up ok over HTTPS but it wouldn’t let me login successfully.

        In this case, it was a plugin interfering – ”Chap Secure Password Login”. After deactivating it, logins worked ok (and in fact, it’s not needed when WordPress is configured to force SSL on the admin page).

        So I would suggest checking any login related plugins and try deactivating them.

        Another issue is if you are using something like HAProxy in front of your webserver for load balancing, and get something like a ”too many redirects” error message after trying to move WordPress to HTTPS.

        In this case, you most likely need to modify wp-config.php to tell WordPress that the connection is actually HTTPS, otherwise it will keep trying to redirect even when the client connection is over HTTPS. There are some details here,

  25. Monu

    Hello sir I am using wordpress with https and www ……………….. in my site everthing is okay url of posts and pages are also use https but in google search results not show https in my website address only show http://www.example.com/post...

    • WPBeginner Support

      You will need to inform Google about change of address from Google Webmaster Tools.

      Administratör

  26. Raivat

    Hi, I followed your tutorial. Thanks, Everything works! But I am getting an error when I load the home page saying ”Your connection to this site is private, but someone on the network might be able to change the look of the page”. I checked it out and it seems there is a problem in one of my font resources which uses Google Fonts with http instead https, can you show me how can I fix this?

    Thanks :)

    • Sebastian

      Try removing the ”http://” from the Google Font call. So it’s not being forced across HTTPS. The reference call to the Google Font link should start with the ”www.” instead of ”http://”

  27. Naval Gupta

    Should we use 301 redirect to redirect all http pages to https pages?

  28. Mark Cohen

    Everything working fine, except that when on Dashboard > Home I get exclamation mark across padlock in URL bar. Anyone know what content is being served insecurely on this page?

  29. Joel

    I made the changes in the site before I set up the certificate and now can not access the back end of my site.

  30. David gillies

    Hi followed your example and now cant access the website at all
    if I try

    all I get is jumbled page with no styling

  31. Adrienne

    I need to do this soon for my nonprofit site, and I’m scared! :-) Paying for this is going to be extra too, but I have to do it!. Thanks for this info….

  32. Lourdes

    So this comes up when I google my Blog Page. Using Bluehost/wordpress – DOES THIS MEAN O need to fix the SSL Cert issue aka buy from bluehost? Thank you!!!!

    [We didn’t find any SSL certificate present on the website which is bad for users privacy. The site has a title but meta description is absent, it will be better for SEO if both are present. Homepage is in English.]

  33. Maxim

    Thanks for this post! Helped a lot!

  34. Penny

    What if you have Mixed Content going on and were asked to fix that before you proceed with installing SSL?

    My Firewall, Sucuri said that I need to fix the mixed content before they can install the SSL. Now I’m stuck and do not know how to proceed. I’m nervous with installing plugins. They recommended really-simple-ssl plugin. Have you had any experience with this? I try to limit the using plugins…

  35. Jarred

    We installed the plugin WordPress HTTPS (SSL). We chose to only use SSL on specific pages option and everything is working great. However we have two important questions that came about after reading the GOOGLE article about migrating to https. Not sure if I can share link on here, so this is the title ”Secure your site with HTTPS” on support google.
    Questions.
    1. Does the plugin WordPress HTTPS (SSL) automatically create 301 redirects to help search engines know we moved to https on those specific pages?
    2. If the plugin does not create the 301 redirects, do WE need to go ahead and create the 301 redirects manually for those specific pages that we added SSL on? Thank you in advance

    • WPBeginner Support

      See if the plugin is redirecting by checking it with an online redirect checker tool. If it isn’t, then you can setup your own redirects.

      Administratör

      • Jarred

        I followed your advice and found a redirect tool. We used it and realized that the WordPress HTTPS (SSL) plugin DID in Fact create 301 redirects automatically. Great review and tutorial on this blog post and everything is working great. Thanks

  36. adam vikar

    For a multisite setup, is there a code we can use to force SSL on the main site and NOT a specific subdomain?

  37. Michelle

    I put the wrong info in the SSL host box and now I get a 404 error. I cannot get back to any of my pages to disable the plugin or to change the info in the SSL host box. Please advise….

    • Easiest solution - delete the plug-in

      The easiest solution is to delete the plug-in.

      Access the files on your server (If you are using cPanel, you can use ’File Manager’
      Browse to where the plug-ins are kept
      /wp-content/plugins

      Find the plug-in and delete it.

    • Hiep Pro

      You can use ftp client to delete plugin folder on web dir.

  38. Jithin Johny George

    Hi,

    Awesome step-by-step guide.

    But the plugin you have mentioned,WordPress HTTPS (SSL) has not updated in years.

    Is there any alternative for the plugin ?

    Thank You

    • Penny

      I was advised by my firewall company to use Really Simple SSL. I haven’t tried it yet but they highly recommend it.

  39. Kris Gabriel

    Fantastic guide, simple and usefull.
    The only thing to worry about is that the redirects causes the page to slow a bit down.

    Is implementing the code listed above into the .access file the first choice or is it better with just a plugin?

    I´ve chosen both options, that means both a wordpress https plugin AND .access code.
    Would you say that is benicial or not?

    Kind regards
    Kris

  40. Mursaleen Kamal

    Assalam Alaikum Sir: We Have Been Successfully Implement this Guide on Our Website But We Still Facing Redirect issue,

    Our Website Is Accessing from Both URL

    http and https

    and How to Resolve Mix Content Issue?

  41. Ahmed Muhi

    Thank you so much it worked.

  42. Ali

    Hello,
    Thank you for your guide. I add this code in my htaccess file
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L]

    but now it do not do 301 redirect it is doing 302 redirect.
    Please tell me is it ok to do 302 redirect or not.

    Regards

    • WPBeginner Support

      A 301 redirect means that the page has permanently moved to a new location. A 302 redirect means that the move is only temporary. Search engines need to figure out whether to keep the old page, or replace it with the one found at the new location.

      Administratör

  43. Ana

    Thanks for the article, but I should definitely have read it before adding the SSL and https to WP. Total newbie but somehow managing a wordpress site..

    Changed WP site address on the settings page from http to https after an update recommendation on my admin panel. But now I can’t access the website or admin page! All I get is a blank page with the message ERR_TIMED_OUT and site can’t be reached.

    I realised I hadn’t activated the free SSL certificate that comes with our web hoster. Now I have done that and I’ve tried adding a WP SSL redirect (http to https) code to the .htaccess file as well. And tried adding define force_SSL_admin to wp-config.php, but nothing has changed and I don’t know how to undo or fix the issue. Any suggestions or experience in this issue would be very helpful!

  44. mirko

    sorry, but…I did not understand the part of .htaccess files … Must I add code to my htaccess or mix with my file ?
    my original file is the default wordpress file

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress
    

    The New file is correct ?

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80 
    RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L]
    
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress
    

    Thank you, Mirko

    • Jim

      I’m a little unclear what needs to be in the htaccess file to force SSL
      This is my current htacess

  45. g

    after changing the url in general settings, all css styles are gone, and the wp-login page to change this setting is not showing because of to many redirects. be aware before using this tut, I have to back up.

  46. Mark C

    Hi, what about if we’re using it only for the login.php page, where do we configure it?

  47. christopher

    Thank you for your article! I was wondering though, my website recently has suffered some problems with ”too many redirects” error. I wonder if adding the .htaccess code you mentioned in the article for ssl redirect will make the problem worse? Some visitors to my website said they often see ”this page isn’t redirecting properly” when they come to our website. Could it be that our customers are having trouble visiting our website because I don’t have that code in my .htaccess file?

  48. Melvin

    Hi! I was wondering if there’s a reason why you only want SSL on specific pages instead of the whole website? Could this be because of performance?

  49. Ahmed

    Hello Syed! Great tutorial. I just want to ask that when ssl error window appears in browsers. Whether its the time to login,shopping or everytime you visit specific websit….For example if I have a blog which don’t offer login or shopping whteher ssl certificate is required or not???

    • WPBeginner Support

      It is not required, but will certainly give you plus points in search results.

      Administratör

  50. Jaclyn Mamuzich

    Hello,

    For some reason our blog is not showing as https even though we have an ssl installed and I thought it was done before the migration but I could be wrong. I followed the steps in the article (greatly appreciated :) but for some reason when I complete all the steps, almost all of my styling disappears, specifically related to layout. Any suggestions?

    thanks!

    • Rob

      As with JACLYN MAMUZICH. I have followed all the steps and when the site is viewed in https:// all the CSS has gone. Any suggestions?

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.