301 Redirect For Wordpress Over SSL

I am in the process of migrating an existing Wordpress site on Dreamhost to be served entirely over SSL using a professionally signed certificate.

I understand the best practice to be using a 301 redirect to send all traffic from http://www.myaddress.com to https://www.myaddress.com so that all of my traffic gets served from the https site. This site has a unique ip and is on shared hosting here at dreamhost.

Is there a preferred or “best practice” for creating this type of redirect? I know it can be done with .htaccess. But is there a better method? For instance, can I/should I use the dreamhost control panel to get this redirect done via httpd.conf?

Anyone have thoughts on this or better ways of doing this?

I’ve done it using .htaccess and don’t have any problems with it—no slowdown in performance or the like. It’s the sort of thing .htaccess does really well.

I’d look into using an Htaccess redirect for when port is not 443.

Did you figure out the best way to do this? I want to add a secure certificate in dreamhost panel to my wordpress website soccermoviemom.com. So that I can have a https:// url. But will that wipe out all the google analytics and google search console configurations I have done, and all my past history because it will be a new URL? I will have to redo sitemap etc? How did it affect your WP site?