2

I am currently configuring the different metatags for social sharing on a website that uses an IDN (Internationalized Domain Name).

I came to the realization that the URL shown to the end-user on the post, is not the actual IDN but the decoded one. Digging a bit into this, I came to this conclusion after reading, the wiki for IDNs and the actual encoding mechanism used, punycode.

So, to my understanding, this is normal behavior? If this is normal behavior, is there a way to prevent this from happening?

The reasoning for this question is that, to me, the look of the decoded URL looks like something hacky and the end-user might be averted from clicking on it.

5
  • Which social media sites have you tested that have this problem? I tagged your post with facebook and twitter, because I assume you have at least tested the biggest two. Oct 20, 2021 at 12:39
  • "So, to my understanding, this is normal behavior? If this is normal behavior, is there a way to prevent this from happening?". It is normal in the sense "as designed", even if it doesn't seem to fulfill your need. As it is browser dependent you will not be able to control this. Look at this recent question on IDNs for some more context and details: webmasters.stackexchange.com/questions/137191/… Oct 20, 2021 at 14:33
  • @StephenOstermiller I have tested with a Facebook linter. Not with Twitter yet.
    – pierostz
    Oct 20, 2021 at 14:56
  • I edited the question to focus on Facebook then. Oct 20, 2021 at 15:15
  • @PatrickMevzek thanks for your reply. I have read the question you mention. This seems to be per browser policy and I have no control over it.
    – pierostz
    Oct 20, 2021 at 15:36

1 Answer 1

0

I had the same problem. What was working for me is to only use the 'title' and add the url to the 'text' argument. Omit the url argument, as it always gets converted to an ACE URL.

You can test it via https://w3c.github.io/web-share/demos/share-files.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.