Unicode domains have issues with setup
Bug Description
Still exploring the specifics, but it seems unicode domains aren't handled properly by Site Kit.
See:
- https://wordpress.org/support/topic/404-cyrillic-domains/
- https://wordpress.org/support/topic/umlaut-domain/
- https://wordpress.org/support/topic/cannot-get-through-the-setup/#post-12243161
Steps to reproduce
To be determined.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Sites that use unicode domains should be able to complete the setup flow.
- The redirect for e.g. site verification should work as expected, not result in a 404 and ending up with the site owner successfully being verified.
- The site should be matched a correct Search Console property, or one should be created, and the same property should be looked up from / used by the plugin afterwards.
Implementation Brief
- Ensure all domain comparisons use the punycode decoded domain name form for all comparisons.
- Adjust domain comparisons in both
Search_Console.phpandSite_Verification.php, usingRequests_IDNAEncoder::encodeon the host part of each domain being compared.
Changelog entry
- Fix problems around comparing domains with unicode characters that could result in blocking the plugin setup.
I've added a video of the issue here. There seems to be a false REST API error in addition to the underlying problem: https://recordit.co/mAa2yrvYqn
A workaround might be to temporarily change the Site Address (URL) by removing any non standard characters during setup.
I tried changing the Site Address, without result. I don't understand how to remove any non standard characters since I assume that would either break my site or will lock me out of the admin.
Below is just an example URL:
- Setting Site Address to "xn--bcher-kva.example" doesn't work.
- Setting Site Address to "bücher.example" doesn't work either. Instead I can't access the front end anymore since I automatically get redirected to the back end.
Just installed 1.1.0 and was hoping this got finally fixed. Any news on this bug?
No updates yet, sorry. I've been trying to debug it but the error isn't quite clear to me yet. I will post as soon as I figure anything out in this issue though. 😃
The error still exists for me, even after the update.The following happens:
- Within WordPress I try to activate the setup
- Then I get redirected to this url:
https://sitekit.withgoogle.com/site-management/setup/?version=1.1.0&scope=openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fsiteverification%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fwebmasters&supports=file_verification&site_id=QAnYiLpp2s4923vb8zjqw8-amm877p84nCnJcNcKorudh.apps.sitekit.withgoogle.com&code=sitekit-p96rz49qkyj10u1d&verification_nonce=d0acf82193
- When I click under “1) Verify Siteownership” –> “Proceed” is get redirected back to my wordpress installation:
https://xn--dachtrume-02a.de/xn--dachtrume-02a.de/wp-admin/index.php?googlesitekit_verification_token=051bf0f1af5864cd&googlesitekit_verification_token_type=FILE&googlesitekit_verification_nonce=d0acf82193&googlesitekit_code=sitekit-p96rz49qkyj10u1d
- Then nginx tells me: 404 Page does not exist.
https://dachträume.de/xn--dachtrume-02a.de/wp-admin/index.php?googlesitekit_verification_token=051bf0f1af5864cd&googlesitekit_verification_token_type=FILE&googlesitekit_verification_nonce=d0acf82193&googlesitekit_code=sitekit-p96rz49qkyj10u1d
We don't yet have a fix for the error, so it will still appear in the plugin. Sorry about that!
Any updates on this? It's been months and I still can't connect these kind of sites to Sitekit. I even tried to remove all these properties from Search Console and run the setup again, but without any luck.
+1 in support/need of a fix ☝️
@eaglejohn Unfortunately we haven't yet been able to triage this one and reproduce it/debug it, but I'll bring it up next time we have an issue planning session. Thanks for checking in on the issue though.
@jonasskafte In the future, please use GitHub's "reaction" feature to thumbs-up any previous comment. It helps maintainers understand others are "+1"ing an issue without adding too much noise to developer notification inboxes/issue history. Thanks 🙂
Is this plugin actually developed and maintained by Google, just wondering... I asked about this on the WordPress forums but they avoided my question.
@eaglejohn I provided an answer to your topic here that yes it was. Thanks again for your patience.
Hi guys,
Hope you've had a good week.
Any chance a fix to this could be included in Sprint 16 or Sprint 17?? 🤞
Thanks and have a lovely weekend!
Hi again @tofumatt, @jamesozzie and @ernee,
Any chance this can be included as a milestone for your next release?
Thanks!
And there was silence...
@adamsilverstein – thanks for having taken a look at this! 👍
@felixarntz – why did you remove it from the 'oh right' milestone?? You probably have a good reason, but just wondering why?
Hi @jonasskafte, we are working on debugging this but don't have any update yet. We will post an update once we make progress on this.
Thanks,
I've made some progress debugging this issue.
One problem I discovered is that we store our domains in the service as "punycode" like "http://xn--trkish-3ya.com" while the API we use to check for domains returns the unicode variation: "http://türkish.com/" - I fixed this in the service allowing site verification to complete, however the plugin also does a separate lookup after you complete the setup flow and this is failing to identify the connected site.
I will update here once I have a resolution.
@adamsilverstein Can you write a rough IB about the necessary changes on the plugin side? Since this issue mostly talks about site verification and the current PR #1265 addresses Search Console issues, I wonder whether there's more to it. Although more of the fix is likely needed on our service, which we can discuss separately.
@cole10up In order to QA this, I think it's key to have a site with a domain that has unicode characters, and ensure the setup flow completes seamlessly.
Then, specifically also test the setup flow for a site where your Site Address has the unicode version of the URL (e.g. http://türkish.com) while your WordPress Address has the punycode version of the URL (e.g. http://xn--trkish-3ya.com).
Tested
This isn't fixed on my end. Reproduced this issue in setup redirecting during site verification:

Domain: http://türkish.com
Using the attached zip google-site-kit-1.6.0.zip
@felixarntz, log into the domain above and try to setup SK. See below:
