Title: SSL, HTTPS and .htaccess files
Last modified: September 16, 2017

---

# SSL, HTTPS and .htaccess files

 *  [lauraswain](https://wordpress.org/support/users/lauraswain/)
 * (@lauraswain)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/ssl-https-and-htaccess-files/)
 * So as you are probably aware Google is looking for blogs to have an SSL certificate
   and the prefix of HTTPS from October 2017 otherwise they could be punished in
   search criteria.
 * My WordPress hosting is with 1and1 and they have confirmed that my hosting already
   has a SSL starter certificate, however apparently I also need to add some code
   into my .htaccess file in order for my URL to show as HTTPS.
 * I don’t know what a .htaccess file is or how I find and amend it! Can anyone 
   help?
 * Also, I’ve been told that if you update your URL to show as HTTPS you also need
   to update Google Analytics. Is this true? How does this work – will it think 
   it’s a new site and start creating new stats? Or will it recognise that the URL
   has simply been updated and continue with the same information? I don’t want 
   to lose all my old stats.
 * Thanks,
 * Laura

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [8 years, 8 months ago](https://wordpress.org/support/topic/ssl-https-and-htaccess-files/#post-9499686)
 * I’ve moved this topic to Fixing WordPress where it really belongs.
 * > So as you are probably aware Google is looking for blogs to have an SSL certificate
   > and the prefix of HTTPS from October 2017 otherwise they could be punished 
   > in search criteria.
 * Debatable, but moving on.
 * > I don’t know what a .htaccess file is or how I find and amend it! Can anyone
   > help?
 * Is your site already successfully configured to use `https`? It’s an important
   question and knowing that will help me provide you an easier answer than messing
   with your `.htaccess` file.
 * > Also, I’ve been told that if you update your URL to show as HTTPS you also 
   > need to update Google Analytics. Is this true?
 * You may need to ask [Google directly about that](https://support.google.com/analytics/#topic=3544906).
   I’d imagine it would work both ways as Google wants more people using https. 
   I don’t think you’d lose stats as it’s the same site but Google should know.
 * Which plugin are you using for those stats?
 *  [apsolut](https://wordpress.org/support/users/apsolut/)
 * (@apsolut)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/ssl-https-and-htaccess-files/#post-9500251)
 * Just to try to help,
    You should ask you Hosting to setup an SSL (if they did
   it), and if you can access your website with [https://name.tld](https://name.tld)–
   then you have SSL installed – but will need to redirect HTTP to HTTPS, that part
   you can do with [https://wordpress.org/plugins/really-simple-ssl/](https://wordpress.org/plugins/really-simple-ssl/)–
   it will auto add things you need to .htaccess
 * Regards
 *  Thread Starter [lauraswain](https://wordpress.org/support/users/lauraswain/)
 * (@lauraswain)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/ssl-https-and-htaccess-files/#post-9500710)
 * OK so my blog is [http://www.beautybestfriend.com](http://www.beautybestfriend.com).
   I’ve tried accessing my site by inputting [https://beautybestfriend.com](https://beautybestfriend.com)
   and it comes up ok, and 1and1 have told me that I already have an SSL installed.
 * I’m not too sure about adding another plugin, can’t they slow the blog down?
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [8 years, 8 months ago](https://wordpress.org/support/topic/ssl-https-and-htaccess-files/#post-9502297)
 * _*Reads*_
 * The above post was what I was going to suggest.
 * Here’s my advice: Make a full off site backup of your files and database.
 * [https://codex.wordpress.org/WordPress_Backups](https://codex.wordpress.org/WordPress_Backups)
 * This is a safety precaution. Safety nets are good.
 * Once that’s done change both your Site URL and WordPress address from [http://www.beautybestfriend.com/](http://www.beautybestfriend.com/)
   to [https://www.beautybestfriend.com/](https://www.beautybestfriend.com/)
 * You can do that via this link.
 * [http://www.beautybestfriend.com/wp-admin/options-general.php](http://www.beautybestfriend.com/wp-admin/options-general.php)
 * That will take care of anyone hitting your http URL. WordPress will see that 
   but will automatically send any visitors to the https version. Which means you
   do not need to edit your `.htaccess` file. Which is good.
 * But you still need to fix all of your database’s URLs from [http://www.beautybestfriend.com/](http://www.beautybestfriend.com/)
   to [https://www.beautybestfriend.com/](https://www.beautybestfriend.com/) That
   can be accomplished using the methods in this article.
 * [https://codex.wordpress.org/Moving_WordPress#Changing_Your_Domain_Name_and_URLs](https://codex.wordpress.org/Moving_WordPress#Changing_Your_Domain_Name_and_URLs)
 * Even though it’s the same site and nothing is really moving, it still looks like
   a move to WordPress. The URL is changing, just from http to https.
 * The plugins there are all good but I recommend this one.
 * [https://wordpress.org/plugins/better-search-replace/](https://wordpress.org/plugins/better-search-replace/)
 * Make sure you select all tables and search for
 * `http://www.beautybestfriend.com`
 * and replace it with
 * `http://www.beautybestfriend.com`
 * Notice that I left off the trailing slash? That’s a just-in-case and will work.
   Once this has been done, you should be fully https on your site.
 * If something goes wrong, then restore the database backup from above.
 * [https://codex.wordpress.org/Restoring_Your_Database_From_Backup](https://codex.wordpress.org/Restoring_Your_Database_From_Backup)
 * And you’ll be back where you were before you started. I really like safety nets.
 *  Thread Starter [lauraswain](https://wordpress.org/support/users/lauraswain/)
 * (@lauraswain)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/ssl-https-and-htaccess-files/#post-9502603)
 * Thanks for all the advice!
 * So I made a backup then updated the URLs in the WordPress General Settings. Then
   I had a call from 1and1 (which I had already scheduled before getting your help!)
   and they updated the .htaccess file for me.
 * So now when I go to my blog the URL shows up as [https://www.beautybestfriend.com](https://www.beautybestfriend.com)
 * Do I still need to change the database URLs or use the Better Search Replace 
   plugin? Also, do I need to change anything on Google Analytics?
 * Thanks.
 * Laura
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [8 years, 8 months ago](https://wordpress.org/support/topic/ssl-https-and-htaccess-files/#post-9503824)
 * > Then I had a call from 1and1 (which I had already scheduled before getting 
   > your help!) and they updated the .htaccess file for me.
 * That’s nice of them, and that works but it’s not really necessary. Leave it in
   place though as it works too. 😉
 * > Do I still need to change the database URLs or use the Better Search Replace
   > plugin?
 * It’s a good idea as a just in case. The post info in the database will reference
   http instead of https. That could lead to mismatched content errors which is 
   when you have a https page that loads some http content.
 * > Also, do I need to change anything on Google Analytics?
 * I doubt it, but contact Google for that one. They’re encouraging everyone to 
   do this so I don’t think the analytics will have a problem with getting data 
   from your site as http or https.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘SSL, HTTPS and .htaccess files’ is closed to new replies.

## Tags

 * [Certificate](https://wordpress.org/support/topic-tag/certificate/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)
 * [TLS](https://wordpress.org/support/topic-tag/tls/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/ssl-https-and-htaccess-files/#post-9503824)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
