Use A Canonical Url, Amongst Page Url Conditionals

Not all spider web log owners tin successfully add together a conditional display of a template object, to their blog.

Some owners carefully re-create the conditional code that I provide, add together it to their blogs - in addition to it does non run (for them). In or in addition to then cases, it may work, for me, when I banking concern fit their work.

Conditional code, that involves people inwards countries plain of report to the Earth specific domain redirect, won't ever locomote comparing against "blogspot.com". People inwards the Great Britain may run into their spider web log every bit "blogspot.co.uk", for instance.

People inwards the USA, correct now, volition ever run into BlogSpot blogs, every bit "blogspot.com".

This blog, in addition to other blogs published to custom domains, volition ever locomote viewed nether their domain URLs - in addition to then in that place is no worry most Earth specific domain redirect.

How practise you lot compare a spider web log URL, amongst Earth specific domain redirects inwards use?

But what of blogs published to "blogspot.com", exterior the USA? How practise they conditionally display objects, amongst the conditional URL varying according to the Earth specific code of each reader?

When you lot practise a URL comparison, to conditionally display a template object - in addition to the spider web log is published to "blogspot.com" - banking concern fit against the canonical URL.

Use the canonical URL, for conditional comparisons inwards BlogSpot blogs.

Since your spider web log could locomote read past times readers inwards whatsoever country, if your spider web log is published to "blogspot.com", you lot volition desire to base of operations whatsoever URL comparing against the Canonical URL.
  • Compare "data:blog.canonicalUrl" - non "data:blog.url".
  • Compare against the URL, ending inwards "blogspot.com".

Your readers could locomote inwards whatsoever Earth - either the same every bit you, in addition to plain of report to your Earth local domain - if ane applies. Or, they could locomote dissimilar from you, in addition to plain of report to a dissimilar Earth local domain - again, if ane applies.

<b:if cond='data:blog.canonicalUrl != "http://mypersonalblog.blogspot.com"'> <style> #Text1 {display: none !important;} </style> </b:if>

or possibly

<b:if cond='data:blog.canonicalUrl != data:blog.homepageUrl'> <style> #Text1 {display: none !important;} </style> </b:if>




Just avoid using

Related:


    <b:if cond='data:blog.url != "http://mypersonalblog.blogspot.com"'> <style> #Text1 {display: none !important;} </style> </b:if>

    and

    <b:if cond='data:blog.url != data:blog.homepageUrl'> <style> #Text1 {display: none !important;} </style> </b:if>

    This way, everybody inwards every dissimilar Earth tin run into the gadgets entirely when necessary, every bit you lot design. And maybe, you lot tin banking concern fit your spider web log using a service similar GeoPeeker.

    ---

    Blogger spider web log owners, inwards or in addition to then countries exterior the USA, occasionally unwrap that they cannot conditionally display template objects, inwards BlogSpot published blogs, every bit people inwards the USA tin do.

    Owners who alive inwards the USA may non realise that people exterior the USA may non run into their blogs properly, amongst conditionals added. If you lot desire your spider web log gadgets to display properly, inwards BlogSpot published blogs, purpose a canonical URL inwards the comparisons.

    Related Posts

    Iklan Atas Artikel

    Iklan Tengah Artikel 1

    Iklan Tengah Artikel 2

    Iklan Bawah Artikel