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.

Stephen Ostermiller
  • 98,758
  • 18
  • 137
  • 361
pierostz
  • 355
  • 1
  • 9
  • 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. – Stephen Ostermiller Oct 20 '21 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: https://webmasters.stackexchange.com/questions/137191/why-does-%e1%a5%90%e1%a5%9e%e1%a5%a8%e1%a5%b2-com-display-as-xn-rgf2a4a2b-com-in-ff-chrome – Patrick Mevzek Oct 20 '21 at 14:33
  • @StephenOstermiller I have tested with a Facebook linter. Not with Twitter yet. – pierostz Oct 20 '21 at 14:56
  • I edited the question to focus on Facebook then. – Stephen Ostermiller Oct 20 '21 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 '21 at 15:36

1 Answers1

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

Wenzel
  • 1