0

this is my first website. I got the SSL certificate so I could host an app I made that uses the navigator method for location services. However my site does not naturally load on https unless I specifically type the s in place. How do I make it always load securely?

Edit: solved here is the link I used to solve this issue using godaddy hosting

Link to godaddy help page

vampiire
  • 1,111
  • 2
  • 15
  • 27
  • possible duplicate to http://stackoverflow.com/questions/85816/how-can-i-force-users-to-access-my-page-over-https-instead-of-http. "rewrite" is one way but the best solution IMO will be HSTS. – Baski Apr 08 '17 at 02:22

1 Answers1

1

To force all web traffic to use HTTPS insert the following condition in your root folder's .htaccess file.

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.your-website.com/$1 [R,L] 
  • damn I don't seem to have that file :/ – vampiire Apr 08 '17 at 02:22
  • Just create one in your root directory –  Apr 08 '17 at 02:23
  • is root directory public_html? – vampiire Apr 08 '17 at 02:24
  • sorry I am very new to this. there isn't much information for these stupid questions online because apparently I'm the only one who doesn't get it naturally – vampiire Apr 08 '17 at 02:24
  • it says it already exists but it's not showing up and doesn't appear when I search all my folders for it. thanks for trying – vampiire Apr 08 '17 at 02:30
  • Its a hidden file. Do you have any options to show all files in you UI, maybe hidden files are not being shown now? –  Apr 08 '17 at 02:31
  • no I looked everywhere. no options to view hidden files. how annoying – vampiire Apr 08 '17 at 02:33
  • well I gave you credit because your solution helped give me a term to search "redirect" here is the link I used to solve this issue for godaddy https://www.godaddy.com/help/redirect-urls-with-your-hosting-account-5120 – vampiire Apr 08 '17 at 02:51