Solved hreflang href: Should Japanese URL characters be encoded
-
Hi all,
I have searched in vain for a concrete answer to this question.
If you're dealing with the hreflang tags yourself (i.e. don't use automation plugins etc.), is it okay if the URLs (e.g. in Japanese) remain unencrypted?
Example (not encoded):
<link rel="alternate" hreflang="ja" href="https://domain. com/エグザイルリンク/" />The same encoded:
<link rel="alternate" hreflang="ja" href="https://domain. com/%e3%82%a8%e3%82%b0%e3%82%b6%e3%82%a4%e3%83%ab%e3%83%aa%e3%83%b3%e3%82%af" />When checking the unencoded tags in hreflang checkers, they don't seem to have a problem with this (they don't flag any issues).
Also on other websites I see both approaches with unencoded and encoded hreflang variants.
What is your opinion on this, could there be conflicts and/or is there a best practice?
Thanks all
-
@Hermski If you're manually adding hreflang tags to your website and not using automation plugins, using unencoded URLs is acceptable. Hreflang checkers usually don't have issues with unencoded tags, and many websites use both encoded and unencoded hreflang variants.
Encoded URLs help avoid potential issues with special characters or encoding errors. However, if you're comfortable using unencoded URLs and your hreflang tags are being properly recognized by search engines, there's no inherent conflict or best practice that dictates one approach over the other. -
@Hermski If you're manually adding hreflang tags to your website and not using automation plugins, using unencoded URLs is acceptable. Hreflang checkers usually don't have issues with unencoded tags, and many websites use both encoded and unencoded hreflang variants.
Encoded URLs help avoid potential issues with special characters or encoding errors. However, if you're comfortable using unencoded URLs and your hreflang tags are being properly recognized by search engines, there's no inherent conflict or best practice that dictates one approach over the other.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Three version of english pages: EN-US, EN-GB und EN as x-default
We want address the search market for USA and UK. Therefore all english pages have small regional variations with similar content. Since a longer time (after a relaunch) Google has problems to identify the right page (/en-gb/) for the right search market (UK) - although we use hreflang and sitemaps from the beginning. We monitor those in moz for our UK campaign (/en-gb/ pages) by jumps in the ranking of individual keywords (>-50 and >+50). -50 means not that the ranking of our website is lost. In this case Google will substitute the ranking of the /en-gb/ page with the variant /en/. One excample:
Technical SEO | | PeterGolze
https://www.openmind-tech.com/en-gb/industries/cam-software-for-motor-sports/
This page lost the ranking and the other languag variant is ranking for position 2.
https://www.openmind-tech.com/en/industries/cam-software-for-motorsport/ In the moment I have no idea what we can change in our html code.0 -
Trailing Slashes on URLs
Hi we currently have a site on Wordpress which has two version of each URL trailing slash on URLs and one without it. Example: www.domain.com/page (preferred version - based on link data) www.domain.com/page**/** The non-slash version of the URL has most of the external links pointing to them, so we are going to pick that as the preferred version. However, currently, each version of every URL has rel canonical tag pointing to the non-preferred version. E.g. www.domain.com/page the rel canonical tag is: www.domain.com/page/ What would be the best way to clean up this setup? Cheers.
Intermediate & Advanced SEO | | cathywix0 -
Sitemap generator which only includes canonical urls
Does anyone know of a 3rd party sitemap generator that will only include the canonical url's? Creating a sitemap with geo and sorting based parameters isn't the most ideal way to generate sitemaps. Please let me know if anyone has any ideas. Mind you we have hundreds of thousands of indexed url's and this can't be done with a simple text editor.
Intermediate & Advanced SEO | | recbrands0 -
URL mapping for site migration
Hi all! I'm currently working on a migration for a large e-commerce site. The old one has around 2.5k urls, the new one 7.5k. I now need to sort out the redirects from one to the other. This is proving pretty tricky, as the URL structure has changed site wide. There doesn't seem to be any consistent rules either so using regex doesn't really work. By and large, the copy appears to be the same though. Does anybody know of a tool I can crawl the sites with that will export the crawled url and related copy into a spreadsheet? That way I can crawl both sites and compare the copy to match them up. Thanks!
Intermediate & Advanced SEO | | Blink-SEO0 -
WIX? How to change URLS and is it any good for SEO
I have Wix website and want to change its url structure, but not able to do so, any one know how to do so?. Does below URLs work for SEO? And Is Wix is good for SEO or not? abc.com/#!how-it-works/c46c abc.com/#!party-event/c1lzb
Intermediate & Advanced SEO | | Dan_Brown10 -
Expired urls
For a large jobs site, what would be the best way to handle job adverts that are no longer available? Ideas that I have include: Keep the url live with the original content and display current similar job vacancies below - this has the advantage of continually growing the number of indexed pages. 301 redirect old pages to parent categories - this has the advantage of concentrating any acquired link juice where it is most needed. Your thoughts much appreciated.
Intermediate & Advanced SEO | | cottamg0 -
Is it OK to have a site that has some URLs with hyphens and other, older, legacy URLs that use underscores?
I'm working with a VERY large site that has recently been redesigned/recategorized. They kept only about 20% of the URLs from the legacy site, the URLs that had revenue tied to them, and these URLs use underscores. Whereas the new URLs created for the site use hyphens. I don't think that this would be an issue for Google, as long as the pages are of quality, but I wanted to get everyone's opinion on this. Will it hurt me to have two different sets of URLs, those with using hyphens and those using underscores?
Intermediate & Advanced SEO | | Business.com0