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

How to Properly Move WordPress from HTTP to HTTPS (Beginner’s Guide)

Beginners often ask us about moving their websites to SSL or HTTPS. The terms may sound too technical, but it is actually very easy to do.

HTTPS in a website’s URL means that it uses a secure data transfer protocol by installing an SSL certificate. This is important because most modern browsers show warnings for websites that do not use HTTPS.

Luckily, most reliable hosting companies and WordPress make it very easy to secure your website.

In this article, we will show you how to move your WordPress from HTTP to HTTPS by adding an SSL certificate. Don’t worry if you don’t know what SSL or HTTPS is. We will explain that as well.

Moving WordPress from HTTP to HTTPS / SSL

Here is a quick overview of the topics we will cover in this article:

What Is HTTPS?

HTTPS, or Secure HTTP, is a method of encryption that secures the connection between a user’s browser and your server. This added security makes it much more difficult for hackers to intercept the data being transferred.

Every day, people share personal details with websites, whether they are making purchases or simply logging in. We’ve seen firsthand how crucial it is to protect this type of data exchange.

To ensure data safety, a secure connection needs to be established.

This is where SSL and HTTPS come into play.

Each website receives a unique SSL certificate for identification. If a server tries to use HTTPS without a valid certificate or if the certificate doesn’t match, most modern browsers will alert users and advise them not to proceed.

Connection not private error in Google Chrome

Now, you might wonder why moving your WordPress site from HTTP to HTTPS is necessary, especially if it’s a simple blog or small business website that doesn’t process payments.

Why Do You Need HTTPS and SSL?

Back in 2018, Google announced an initiative to boost web security by urging site owners to switch from HTTP to HTTPS. To support this move, their Chrome browser started marking all websites without an SSL certificate as “Not Secure.”

Connection not secure

Google also mentioned that sites with SSL would receive SEO advantages and could achieve higher search rankings than non-secure sites. This announcement pushed many site owners to switch to HTTPS.

Once the “Not Secure” warning rolled out, Chrome began flagging HTTP sites. For instance, visiting an HTTP site in incognito mode or filling out a contact form on an HTTP site triggers the warning, marking it as insecure.

When visitors see this warning, it can leave a negative impression of your site or business.

This is why all websites need to transition to HTTPS and install SSL as soon as possible.

Moreover, SSL is a must if you want to accept online payments on your eCommerce site.

Payment providers like Stripe, PayPal Pro, and Authorize.net require a secure payment connection.

We ensure our own sites use SSL, including WPBeginner, OptinMonster, WPForms, and MonsterInsights.

Requirements for Using HTTPS/SSL on a WordPress Site

The requirements for using SSL in WordPress are not very high. All you need to do is purchase an SSL certificate, and you might already have it for free.

The best WordPress hosting companies are offering free SSL certificates for all their users:

For more details, see our guide on how to get a free SSL certificate for your WordPress website.

If your hosting company does not offer a free SSL certificate, you’ll need to purchase one.

We recommend Domain.com because it offers the best SSL deal for regular and wildcard SSL certificates.

By purchasing an SSL certificate from them, you also get a TrustLogo site seal for your website. Each SSL certificate comes with a minimum security warranty of $10,000. Pricing starts at $33 annually, and SSL certificates are renewed automatically.

Once you have purchased an SSL certificate, you’ll need to ask your hosting provider to install it for you.

Need Help Setting Up SSL and Moving to HTTPS?

If you don’t have time to set up SSL, our Premium WordPress Support service is here to help! We can handle the entire process for you, ensuring your site is secure and ready for visitors.

  • One-time fee
  • Fast turnaround times
  • Available on-demand 24/7

You can rest easy knowing your site is in expert hands. Contact us today for seamless SSL installation and HTTPS migration!

Setting Up WordPress to Use SSL and HTTPS

After enabling an SSL certificate for your domain name, you will need to set up WordPress to use SSL and HTTP protocols on your website.

We will show you two methods for doing that, and you can choose the one that best suits your needs.

Method 1: Setup SSL/HTTPS in WordPress Using a Plugin

This method is easier and is recommended for beginners.

First, you need to install and activate the Really Simple SSL plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit the Settings » SSL page. The plugin will automatically detect your SSL certificate and set up your WordPress site to use HTTPS.

SSL enabled on a WordPress website

The plugin will take care of everything, including the mixed content errors. Here’s what the plugin does behind the scenes:

  • Check SSL certificate
  • Set WordPress to use https in URLs
  • Set up redirects from HTTP to HTTPS
  • Look for URLs in your content that are still loading from insecure HTTP sources and attempt to fix them.

Note: The plugin attempts to fix mixed content errors by using an output buffering technique. This can have a negative performance impact because it replaces content on the site as the page is loaded. This impact is only seen on the first page load, and it should be minimal if you are using a caching plugin.

While the plugin says you can keep SSL and safely deactivate the plugin, it’s not 100% true. You will have to leave the plugin active at all times because deactivating the plugin will bring back mixed content errors. See our Really Simple SSL review for more details.

Method 2: Set Up SSL/HTTPS in WordPress Manually

This method requires you to troubleshoot issues manually and edit WordPress files. However, it is a permanent and more performance-optimized solution, and we’re using it on WPBeginner.

If you find this method difficult, you should hire a WordPress developer or use the first method instead.

You may need to edit the WordPress theme and code files as part of this method. If you haven’t done this before, see our guide on copying and pasting code snippets in WordPress.

First, you need to visit the Settings » General page. From here, you need to update your WordPress and site URL address fields by replacing http with https.

Update WordPress URLs

Don’t forget to click on the ‘Save changes’ button to store your settings.

Once the settings are saved, WordPress will log you out, and you will be asked to re-login.

Next, you need to set up WordPress redirects from HTTP to HTTPS by adding the following code to your .htaccess file:

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

If you are on NGINX servers, then you will need to add the following code to redirect from HTTP to HTTPS in your configuration file:

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

Don’t forget to replace example.com with your domain name.

By following these steps, you will avoid the WordPress HTTPS not working error because WordPress will now load your entire website using HTTPS.

If you want to force SSL and HTTPS on your WordPress admin area or login pages, you need to configure SSL in the wp-config.php file.

Add the following code above the “That’s all, stop editing!” line in your wp-config.php file:

define('FORCE_SSL_ADMIN', true);

This line allows WordPress to force SSL / HTTPs in the WordPress admin area. It also works on WordPress multisite networks.

Once you do this, your website is fully set up to use SSL / HTTPS, but you will still encounter mixed content errors.

These errors are caused by sources (images, scripts, or stylesheets) still loading using the insecure HTTP protocol in the URLs. If that is the case, then you will not be able to see a secure padlock icon in your website’s address bar.

Not secure

Many modern browsers will automatically block unsafe scripts and resources.

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.

The mixed content error will be displayed as a warning in the console with details for each mixed content item.

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.

Fixing Mixed Content in WordPress Database

Most of the incorrect URLs will be images, files, embeds, and other data stored in your WordPress database. Let’s fix them first.

It would be best if you found all mentions of your old website URL in the database that start with HTTP and replaced them with your new website URL that starts with HTTPS.

You can easily do this by installing and activating the Search & Replace Everything plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit the Tools » WP Search & Replace page. Under the ‘Search’ field, you need to add your website URL with http. After that, add your website URL with https under the ‘Replace’ field.

Add URLs into the search and replace fields

Below that, you will see all your WordPress database tables.

You need to select all of them to run a thorough check.

Select all tables in Search & Replace Everything

Then, click the ‘Preview Search & Replace’ button to see all of the changes the plugin will make.

Lastly, click the ‘Replace All’ button.

Click the Replace All button

The plugin will now search your WordPress database for the URLs starting with http and replace them with secure https URLs. It may take a while, depending on your WordPress database size.

Fixing Mixed Content Errors in WordPress Theme

Another common culprit causing mixed content errors is your WordPress theme. Any decent WordPress theme following WordPress coding standards will not cause this issue.

First, you will need to use your browser’s Inspect tool to find the resources and where they are loading from.

Using inspect tool to find mixed content error

After that, you will need to find them in your WordPress theme and replace them with https. This will be a little difficult for most beginners, as you will not be able to see which theme files contain these URLs.

Fixing Mixed Content Errors Caused by Plugins

Some mixed content resources will be loaded by WordPress plugins. Any WordPress plugin following WordPress coding standards will not cause mixed content errors.

We don’t recommend editing WordPress plugin files. Instead, you should contact the plugin author and let them know. If they do not respond or are unable to fix it, you should find a suitable alternative.

Note: If, for some reason, you’re still encountering a mixed content error, we recommend temporarily using the Really Simple SSL plugin so your users are not impacted while you fix the issue on a staging website or hire a developer.

Submit Your HTTPS Site to Google Search Console

Search engines like Google consider https and http to be two different websites. To avoid any SEO issues, you will need to let Google know that your website has moved.

To do that, you just need to go to your Google Search Console account and click on the ‘Add property’ button.

Add property

This will bring up a popup where you need to add your website’s new https address.

There are two methods for site verification: domain name or URL prefix. We recommend the URL prefix method because it is more flexible.

Add website URL in Google Search Console

After that, Google will ask you to verify ownership of your website.

There are several ways to do that. Select any method, and you will get instructions to verify your site. We recommend using the HTML tag method.

HTML tag method to verify your site

You will now see an HTML code snippet that you need to add to the head section of your WordPress website.

Add Search Console Verification Code using All in One SEO

First, install and activate the All in One SEO for WordPress plugin. For more details, see our tutorial on how to install a WordPress plugin.

Note: There is also a free version of All in One SEO that you can try.

Upon activation, go to the All in One SEO » General Settings page and click on Google Search Console.

Add Google Search Console verification code in All in One SEO

Below that, you need to add the verification code you copied earlier from the Google Search Console website.

Don’t forget to click on the ‘Save Changes’ button to store your settings.

Next, switch back to the Google Search Console tab and click the ‘Verify’ button.

Verify ownership

Once your site is verified, Google will show your search console reports here.

You also need to ensure that both the https and http versions are added to your Search Console.

This tells Google that you want the https version of your website to be treated as the primary version. Combined with the 301 redirects set up earlier, Google will transfer your search rankings to the https version of your website, and you will most likely see improvements in your search rankings.

Bonus Resources

The following are a few additional resources that can help you fix common WordPress problems on your own and learn more about WordPress:

Video Tutorial

Subscribe to WPBeginner

We hope this article helped you add HTTPS and SSL in WordPress. You may also want to see our ultimate WordPress security guide with step-by-step instructions to keep your WordPress site secure or how to renew your SSL certificate.

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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

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.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

407 CommentsLeave a Reply

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

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

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

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

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

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

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

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

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

      Admin

  10. Pat B

    Fantastically clear and helpful instructions. Many thanks!

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

  12. Vaggelis

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

  13. Esther

    Thanks so much for this.

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

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

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

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

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

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

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

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

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

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

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

      Admin

  25. 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://”

  26. Naval Gupta

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

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

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

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

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

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

  32. Maxim

    Thanks for this post! Helped a lot!

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

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

      Admin

      • 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

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

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

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

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

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

  40. Ahmed Muhi

    Thank you so much it worked.

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

      Admin

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

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

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

  45. Mark C

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

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

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

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

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

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.