Problems with https and certificates - Documentation root?

How or where can I incorporate this bit off language that ensures the website when loaded will ensure that https comes up before the domain name. also would putting out keywords of the domain name if its misspelt cause any difficulty?

Below is a part record of the customer services with a Hosting company in uk answer:

'All the URLs on your website need to have https:// instead of http:// in order to work. Alternatively you can create a file called “.htaccess” in the Documentation root of your website and add the following code to enforce HTTPS.

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

I look forward to your advice and answers
many thanks

Andrew Bailey (abdesigns@ntlworld.com)

If you have cPanel access @abdesigns I would do a permanent redirect of all the www(s) and non www(s) - aka, wildcard, and http onto https instead of going through the htaccess file.

Hi FlamingFig
yes Im hosting four other domains under my hosting platform I have with ukhost4u and I do have access with c-panel. unfortunately my skills are in design not programming and so I have been contacting the guys at ukhost…
All the domains ( and some have been on for some years) were working fine but yesterday whilst finally putting out my new clients domain I was having conflicts with certificates and maybe partly the domains are also in ftp accounts in the c-panel too.
but I agree with you that it really is my last resort.
Finally all the domains in sparkle have been set at https

thank you for your advice
Andy

Hi.

@Duncan gave me this advice:

Solved my problem!

How to make a .htaccess file? I would do it like this:

  • Use a simple text editor and insert the code
  • Save the new file as htaccess.txt (files beginning with a dot are normally hidden)
  • Use Filezilla FTP Program
  • Log into your webspace
  • Transfer the newly created file in ASCII mode to the root directory (normally where the index.html is)
  • Make a right click on this file in your webspace directory
  • Rename it to .htaccess

That should do the trick.

Mr. F.

1 Like

Hi Mr Fozie,
Thank you for your info. I shall make a copy of that for the future.However the guy Im in contact with via the hosting company very kindly set up the file under one of my hosted domains and said if I need to follow through to my other hosted domains just simply copy and paste. it finally as all my hosted domains now working well with the padlock and https.
Sadly Im absolutely useless with the technical side of stuff but make up for it in the creative, thankfully but what surprised me was how all tis seem to turn within a day of setting up my recent clients domain.

a big thanks to those who responded to my plight and all the best

Andy

1 Like