Latest News

Showing posts with label Custom Domains SSL. Show all posts
Showing posts with label Custom Domains SSL. Show all posts

Custom Domains And HTTPS Redirection Code

As most of us know, Blogger HTTPS support does not include custom domain publishing.

The advantages offered by HTTPS access are widely advertised - and have led to envy between blog owners who publish to custom domains, and native BlogSpot blog owners proudly advertising their new HTTPS connectivity.

Long ago, we saw possibly malicious code which helps our readers avoid using country code aliases, to read our blogs from an aliased country. Recently, there was dodgy code which blocked HTTPS mode, to read a customised blog.

Now, we have custom code to force HTTPS access, for BlogSpot published blogs.

Along with providing code to help blog owners avoid country local domain aliasing, some marginally helpful hackers are providing code to help blog owners force reader access to HTTPS.

Some blog owners always wanted HTTPS to be used, to access their blog.

Some blog owners wanted their readers always using HTTPS to access their blogs, before forced HTTPS access became an option. They Googled, and found, semi helpful hackers who provide clever code to force the "HTTP --> HTTPS" redirection.

<script type='text/javascript'>
$(document).ready(function() {
  $("a[href^='http://']").each(
    function(){
      if(this.href.indexOf(location.hostname) == -1) {
        $(this).attr('target', '_blank');
      }
    }
  );
  $("a[href^='https://']").each
    function(){
      if(this.href.indexOf(location.hostname) == -1) {
        $(this).attr('target', '_blank');
      }
    }
  );
});
</script>


This is clever code - when only BlogSpot access is involved. When you add BlogSpot to custom domain redirection, it becomes another "404".



Adding this clever code is an excellent solution - until the blog owner forgets about it, and later upgrades to a non BlogSpot custom domain.

With a custom domain published blog, the redirection becomes a problem.

The added code contains no exception to permit custom domain published blogs to remain in HTTP mode. When accessing an otherwise properly setup custom domain published blog, from a reader using the "blogspot.com" URL, this prevents the BlogSpot to domain redirect from operating.

BlogSpot URLs, which should redirect to the HTTP published custom domain URL, instead redirect to a non existent HTTPS URL - and result in another "404". As the custom domain URL becomes more commonly used for a recently published blog, confusion increases when the rarer BlogSpot URL reference is encountered.

My blog has been using the domain URL for months, why is this happening now?

The problem involves dual redirection - to "https:" mode, and to the custom domain.

After painful problem diagnosis, we find the clever redirection code buried in template HTML - and we see that the blog reader is starting from the BlogSpot URL, and using the BlogSpot to domain redirection, to access the blog.

With blog access redirected to "https:" mode, then subsequently to the custom domain URL, the readers sees a "404" - because the custom domain URL is not available as "https:" content.

This problem will become increasingly rarer - but not extinct.

As self caused custom domain victims become rarer, this way of breaking ones own blog will become more obscure - and it's likely that some cases will go, unsolved. This will be similar to the problem of un migrated classic templates, which has increasingly less experienced support.

If you must install unsupported template tweaks into your template - consider the long term effects. Learn to recognise a problem that you have caused, to your own blog.

Not every helper will realise that you have added custom redirection code - and when looking at the problem code, when a problem is reported, will recognise it for what it is. Your problem may remain your problem - at least, until Blogger Engineering completes Blogger SSL integration (may this happen soon).



Some blog owners have added clever HTTP to HTTPS redirection code, acquired from helpful third party providers, installed in the template. When later publishing a blog to a custom domain, this code will prevent proper blog access - and as installed, may not be easily recognised.

https://productforums.google.com/forum/#!category-topic/blogger/bl5W39BKX4U

Blogger Magic - Adding Label Search URLs

One of the simplest ways to make a blog useful is to add label searches.

Adding label searches, in page / post text, is not easy - unless you know how to build the URLs. Here's a label search from this blog.
http://blogging.nitecruzr.net/search/label/Blogger%20Magic
All that I want, when using that label search, is to add another reference to my "Blogger Magic" post series.

"Blogger Magic" emphasises how easy it is, to use Blogger. How easy is it, to remember that syntax - to add a label link? Maybe, a "Blogger Magic" reference, in this post?

When you read a blog post, that has label references, look at the bottom of the post.


Please note the advice, at the bottom of the post.

Look in the post footer, for the "Labels" section.


Here's the bottom of another post, from this blog.




Here's the bottom of this post.



Note that not all blogs will provide a "Labels" posts section. That is an owner choice.

Look at a label link, in the "Labels" section of the post - when provided.

There's the bottom of two of my "Label Search" posts - "Blogger Magic - A Blog Within A Blog", followed by this post "Blogger Magic - Adding Label Search URLs". Now, look at the Labels links.

In most blogs, the Labels links would be labeled "Labels". I call mine "Topics". As owner of this blog, that is my personal choice.

Also, in most blogs, the "Labels" section will be found, in the post footer. Some blog owners have chosen to position their "Labels" in the post header. This, too, is their choice - and carries with it, some risk.


See "Label Search"?



Look in the browser status area, when hovering over the link caption.

Look at the "Topics" section. See "Label Search"? Hover the mouse cursor, over the "Label Search" link.


See the label search URL, in the browser status area?



Look in the browser status area, when hovering over the link caption.

Hover the mouse over "Label Search", and look in the browser status area.
blogging.nitecruzr.net/search/label/Label Search

For a blog using an HTTPS redirect, you might see a slightly different URL.

If this blog uses the "HTTPS: Redirect" option, you might see it slightly differently.
https://blogging.nitecruzr.net/search/label/Label%20Search

Click on either of the above 2 links. OK, I cheated with the second link - since this blog, right now, does not support HTTPS - and I obviously don't want you looking at an HTTPS Error display.

Whether HTTP - or HTTPS - is in use, there is the label search link.

Whichever you see - and decide to use - with your blog, there is a label search URL. Now, get a label search URL from your blog - and use the URL, in another page or post in your blog.

This post opens many links in new tabs / windows, intentionally.

BTW - and if you have clicked on any of the links above - and since you have apparently read to this point - I have to warn you that many of the links, above, are intentionally coded to open in a new tab / window. That is necessary, based on the nature of the links in this post.

Many of the links in this post are clickable, simply to illustrate to you the content in label searches - as opposed to links which lead you to additional information in the blog. So as not to lead you away from this post, you should not lose context after clicking on a link - as long as you simply close the new (illustrative) tab / window.

My sincere apologies, if my seemingly gratuitous opening of new tabs / windows inconveniences or offends you.



Some #Blogger blog owners want to use label search URLs, in page or post text. Getting a label search URL is easy enough, when you look in the post label search section - which is generally in the post footer.

Contact Us

24x7 online , we happy to answer you
tamilcypc@gmail.com

Disclaimer

This Blog and its TUT's are intended for educational purposes only, no-one involved in the creation of this TuT may be held responsible for any illegal acts brought about by this Blog or TuT.



Featured Post

Custom Domains And HTTPS Redirection Code