A link with a differentiating ccTLD

I am using blogger. I am not an expert. I’m trying to add an image on a post, with a link that differentiates according to the ccTLD you are on.

so for example, if you’re on “example.blogspot .ca”, the link attached to the image will be “example.blogspot .ca/p/blog-page_25.html”

And if you’re on “example.blogspot .nl”, the link attached to the image will be “example.blogspot .nl/p/blog-page_25.html”

And if you’re on “example.blogspot .com”, the link attached to the image will be “example.blogspot .com/p/blog-page_25.html”

Hopefully, you understand what I’m trying to say.

Can someone help me to do it?

Hi Sal,

I’m not sure I do. :slight_smile:

First, is your blog hosted on all three toplevels, or is the problem Google’s redirection of your blog address to your visitors’ own country toplevel for your blog?

Personally I don’t like that Google is redirecting domains they own to the toplevel of the country they think I’m in.

Your link examples suggest you are using “absolut urls” for the image, and that you need a url that’s pointing to the current toplevel for the visitor.

Have you tried linking to the image using a “relative url”?

The relative image url for “example.blogspot.com” would be: “/p/blog-page_25.html”.
/” is the site’s root directory, so for example “/index.html” in the site menu is for the browser the same as the absolute url “http://example.blogspot.ca/index.html” and also “http://example.blogspot.nl/index.html” and “http://example.blogspot.com/index.html

I’ve noticed that often the blogspot site requests resources that is linked to with the original blogspot toplevel. That is the case when the urls are absolute, i.e. the url is using the full path that includes the domain name.

I’m not a blogger user. But I don’t think the platform rewrites relative paths adding the domain name with the original blogspot site’s toplevel. :slight_smile:

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.