UBBCentral

Transition Your Forum From HTTP to HTTPS

Posted By: isaac

Transition Your Forum From HTTP to HTTPS - 09/23/17 07:14 PM

Make the transition of an existing UBB.threads forum from http to https.

Summary
1) Obtain a valid security certificate from your webhost or a reputable third-party seller. I've purchased many "PositiveSSL" certs from SSLs.com.
2) Install it using SHA-2 and make sure it is configured properly.
3) Update ALL your URLs in the Control Panel or manually in your config.ini file. This includes the Homepage URLs, Contact pages, Referer Check, any forum headers/footers, etc.
4) Run a SQL query on your posts, private messages, user avatars, profile comments tables to replace "http://www.YOURDOMAIN.COM" with "https://www.YOURDOMAIN.COM"
5) Set up HTTP to HTTPS 301 redirects in your .htaccess file to forward from http:// to https://
6) Update all external plugins to ensure they are HTTPS compliant (sharaholic, twitter, facebook, youtube, ubb custom-tags, and, if your website contains non-UBB.threads content, all those internal site links - trust me you won't find them all in a single pass)
7) Test your website.
BONUS: Update your URLs in google/bing webmaster tools. Update any ads placed on your website, such as Google Adsense. Update any website analytics code.


** MAKE A BACKUP BEFORE YOU BEGIN **


The SQL
** BE VERY CAREFUL OF "POST_DEFAULT_BODY" and "POST_BODY" USAGE - DO NOT INTERCHANGE THEM
• POST_DEFAULT_BODY - [BBcode] This is the original post. CONTENT REBUILDER > REBUILD POSTS takes this and converts it to POST_BODY [HTML]
• POST_BODY - [HTML] This is shown to the user. it is generated from POST_DEFAULT_BODY

To update your POSTS:
* ubbt_POSTS - POST_DEFAULT_BODY
Code
UPDATE ubbt_POSTS
SET POST_DEFAULT_BODY = replace(POST_DEFAULT_BODY, 'http://www.YOURDOMAIN.COM', 'https://www.YOURDOMAIN.COM');

* ubbt_POSTS - POST_BODY
Code
UPDATE ubbt_POSTS
SET POST_BODY = replace(POST_BODY, 'http://www.YOURDOMAIN.COM', 'https://www.YOURDOMAIN.COM');


To update your PRIVATE MESSAGES:
* ubbt_PRIVATE_MESSAGE_POSTS - POST_DEFAULT_BODY
Code
UPDATE ubbt_PRIVATE_MESSAGE_POSTS
SET POST_DEFAULT_BODY = replace(POST_DEFAULT_BODY, 'http://www.YOURDOMAIN.COM', 'https://www.YOURDOMAIN.COM');

* ubbt_PRIVATE_MESSAGE_POSTS - POST_BODY
Code
UPDATE ubbt_PRIVATE_MESSAGE_POSTS
SET POST_BODY = replace(POST_BODY, 'http://www.YOURDOMAIN.COM', 'https://www.YOURDOMAIN.COM');


To update your USER AVATARS and PROFILE COMMENTS:
* ubbt_USER_PROFILE - USER_AVATAR
Code
UPDATE ubbt_USER_PROFILE
SET USER_AVATAR = replace(USER_AVATAR, 'http://www.YOURDOMAIN.COM', 'https://www.YOURDOMAIN.COM');

* ubbt_PROFILE_COMMENTS - COMMENT_BODY
Code
UPDATE ubbt_PROFILE_COMMENTS
SET COMMENT_BODY = replace(COMMENT_BODY, 'http://www.YOURDOMAIN.COM', 'https://www.YOURDOMAIN.COM');


To update your USER SIGNATURES:
* ubbt_USER_PROFILE - USER_DEFAULT_SIGNATURE
Code
UPDATE ubbt_USER_PROFILE
SET USER_DEFAULT_SIGNATURE = replace(USER_DEFAULT_SIGNATURE, 'http://www.YOURDOMAIN.COM', 'https://www.YOURDOMAIN.COM');

* ubbt_USER_PROFILE - USER_SIGNATURE
Code
UPDATE ubbt_USER_PROFILE
SET USER_SIGNATURE= replace(USER_SIGNATURE, 'http://www.YOURDOMAIN.COM', 'https://www.YOURDOMAIN.COM');



HTTP to HTTPS 301 Redirects For Your .htaccess File
Code
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]




Notes and Further Reading
Full URLs (http:// and https://) vs relative URLs (//):
If you want to correctly FULLY go SSL, use the full protocol name of "http://www.YOURDOMAIN.COM" instead of just "//www.YOURDOMAIN.COM"
The reason to use just double slashes instead of the HTTPS protocol declaration, is if you intend to have your secure urls (https) distribute different content than your open urls (http), since both are seen as separate urls on search engines.

If you are switching to HTTPS, it is advised to fully replace all your http protocol references with https, and forward all calls from http to https. Do not allow the browser/end-user to choose http by leaving your protocol blank with an open "//" url.

If the asset you need is available on SSL, then always use the https:// asset:
http://stackoverflow.com/questions/4831741/can-i-change-all-my-http-links-to-just/27999789#27999789

Why omitting the protocol scheme might not be a good idea:
http://stackoverflow.com/questions/4831741/can-i-change-all-my-http-links-to-just/37654145#37654145

Sometimes IE7 and IE8 do not correctly handle "//" assets. They look at this as being a file transfer, and will attempt to download the page through a download window. Even though the "//" asset is a spec from 1996/1998
https://www.paulirish.com/2010/the-protocol-relative-url/

Google deprecates protocol relative URLs in place of full protocol URLs for the html5 spec:
https://github.com/h5bp/html5-boilerplate/pull/1694/commits/045a1676c4c8cf4bdd23374b5b049507101f5043

Additional discussions:
http://stackoverflow.com/questions/...h-in-a-script-src-http/37609402#37609402


Google SEO HTTPS Migration Checklist (for the ad and SEO focused)
Source: Search Engine Roundtable
• Update all your ad code to support HTTPS
• Ensure your analytics will work on the new HTTPS URLs
• Update your site search (if not using the inbuilt UBB.threads search methods) to support HTTPS and discover new URLs sooner
• Create and submit your new HTTPS XML sitemaps
• Review the Google site move article
• Verify the new HTTPS site with Google Webmaster Tools and track indexation, crawling, search queries, etc.


Final Steps
• Test your site using the Qualys Lab tool
• Followup by searching for, and reading additional articles on "http to https site moves," to know what to expect

and...

[Linked Image]

Attached picture HTTPS SEO Checklist.jpg
Posted By: Gizmo

Re: Transition Your Forum From HTTP to HTTPS - 09/23/17 07:18 PM

Be sure to backup your database before preforming any maintenance as preforming any direct maintenance to the system can leave you with a complete mess and a broken forum.
Posted By: M4TT

Re: Transition Your Forum From HTTP to HTTPS - 10/02/17 09:20 AM

Quote
6) Update all external plugins to ensure they are HTTPS compliant (sharaholic, twitter, facebook, youtube, ubb custom-tags, and, if your website contains non-UBB.threads content, all those internal site links - trust me you won't find them all in a single pass)


In layman's terms, how is this achieved? I just noticed I can't see embedded YouTube videos using the Insert Media Tag method... My SSL Report is Grade A.
Posted By: Gizmo

Re: Transition Your Forum From HTTP to HTTPS - 10/02/17 08:03 PM

You'll have to use any 3rd party sites SSL server to provide secure content for your users; in v7.6.0 we included new UBBCodes that support SSL, simply import them (they're in the "install/custom_codes/tags.php" file in the install files you downloaded from this site) via the tag editor in the control panel (CP -> Tools & Information -> Content Rebuilder -> Custom Tag Editor Tab).
Posted By: isaac

Re: Transition Your Forum From HTTP to HTTPS - 10/02/17 09:49 PM

@M4TT, this is probably what you're looking for. As gizmo pointed out, all of the new codes have also been updated to support https. As usual, after youve updated, run the post/content rebuilder. If you have any third-party software or plugins on your website (not ubb.threads software), you'll need to update those for https per their own instructions.

The following is from the "Special Instructions" section of the v7.6.0 upgrade guide at
https://www.ubbcentral.com/forums/ubbthreads.php/topics/259082/7-6-0-changelog-discussion#Post259088

---

Updated Media Tags
  • Flash Video Embed
  • MySpace Video
  • Vimeo Video
  • Yahoo Video
  • YouTube Video

There are new Media Tags which support displaying videos on mobile devices. You will need to install these manually. After your forum has been upgraded, go to "Control Panel ยป Content Rebuilder" and select the "Custom Tag Editor" top tab. Next, choose "Import New Tags" from the bottom tab. And finally, browse to your local install/custom_codes/ directory from the "ubbthreads-XXX.zip" archive and select the "tags.php" file.

This will add new set of Media Tags to your existing set. The new items will be prefixed by "[new]". From this screen, you can also disable any tag which you dont want displayed on your forum. You should delete any of your old tags that were upgraded within the new set.
Posted By: M4TT

Re: Transition Your Forum From HTTP to HTTPS - 10/03/17 01:38 AM

Okay guys, I just added an s at the end of any http fields in the Content Rebuilder > Custom Tag Editor > Custom Tag List: YouTube Video and ran a rebuild on posts and it's working now!

SSL/HTTPS YouTube Embedded Fix

User Prompt Hint From Text Editor:
Code
YouTube ID; eg: xxxxxxxxxx (or https://www.youtube.com/watch?v=xxxxxxxxxx)



Resulting Markup:
Code
<object width="425" height="350">
 <param name="movie" value="https://www.youtube.com/v/\\2"></param>
 <param name="wmode" value="transparent"></param>
 <embed src="https://www.youtube.com/v/\\2"
  type="application/x-shockwave-flash" wmode="transparent"
  width="425" height="350">
 </embed>
</object>


Thanks for informing of the Custom Tag Editor, very useful!

Thank you smile
Posted By: isaac

Re: Transition Your Forum From HTTP to HTTPS - 10/03/17 12:21 PM

@M4TT, thats the old YouTube tag code from version 7.5.x. It is not mobile friendly and detects just 17 of the top 32 most common different YouTube URL variations. Follow the directions to upgrade to the 7.6.x Youtube REGEX strings, which can detect more than 32 of the most common YouTube variations. In addition, it will not break your forums for mobile users.
Posted By: sundance

Re: Transition Your Forum From HTTP to HTTPS - 02/18/18 04:34 AM

I totally ran across this thread on accident. But BOY do I NEED it! I have a forum that's probably 20-25 years old and still running strong, and upgraded to SSL (https) last fall...and never did the database on the rest of the site (forum) because I didn't want to crash it. It's so HUGE. so I basically just did the homepage, and some other non-forum pages on the site, but I Really need to do the forum cause it's affecting SEO already having mixed content. Bless you! for writing/starting this thread, and everyone who has contributed to it. I'm a website developer (mostly wordpress) who picked up this client with this old site with this UBBThreads forum on it, and it's been a struggle for me ever since I picked it up, but he really hasn't run across anyone in the area even as knowledgeable as I am, which doesn't say much really.

I'm going to read through this, as I contemplate updating some db tables, gently, one at a time. But if anyone is super-experienced and wants to lend a hand, PLEASE don't hesitate to offer. (LOL)

Anyway, ...GOOD STUFF. :-)
Posted By: driv

Re: Transition Your Forum From HTTP to HTTPS - 02/18/18 10:54 AM

Hi Donna,
I too was nervous about the switch to https, but if you follow Isaac's guide, I'm sure you'll be ok.
It went much more smoothly than I'd anticipated.

Backup first! wink
Posted By: sundance

Re: Transition Your Forum From HTTP to HTTPS - 02/18/18 05:48 PM

Did I say I was scared? I guess I revealed that huh...?

Anyway, thanks for the encouragement. It really means a lot.
Posted By: sundance

Re: Transition Your Forum From HTTP to HTTPS - 02/18/18 05:52 PM

isaac, can I use this image on how to move... by any chance?

I love it. -Donna
Posted By: Gizmo

Re: Transition Your Forum From HTTP to HTTPS - 02/18/18 08:11 PM

The how to move graphic is from Nimbus Hosting, we have no ownership over it.
Posted By: Ruben

Re: Transition Your Forum From HTTP to HTTPS - 08/14/18 04:58 PM

what about urls in custom island code?
Posted By: Gizmo

Re: Transition Your Forum From HTTP to HTTPS - 08/14/18 05:02 PM

Everything, your essentially replacing one format for another.
Posted By: Ruben

Re: Transition Your Forum From HTTP to HTTPS - 08/14/18 07:19 PM

Thanks.
© 2018 UBB.threads PHP Forum Software Community