2

I’m using WordPress with RTL|UTF8|Persian content. When I use the example.com/post-name permalink structure, I have two problems:

  • When I change the post URLs, it creates redirect problems. (I don't always choose the best URL the first time.)

  • RTL URLs turns into percent-encoded form when users copy and paste them into social media (like example.com/%D9%87%D8%A7%D8%B1%D8%AF-%D8%A7%DA%A9%D8%B3%D8%AA%D8%B1%D9%86%D8%A7%D9%84). This pushes me to translate my post name into English to get an ASCII URL. But not all authors pay attention to URLs and choose a Persian title.

So I decided to choose the example.com/post-id URL structure. I think this structure have this benefits for me:

  • I never need to change URLs when I update the post titles.
  • It does not depend on post name or site language; and there are no unicode problems.
  • It's short and simple, especially for sharing.

But I have some worries about it. Is it OK from SEO and user experience aspect? Is using number form for the URL path (example.com/1223) a bad idea at all?

Stephen Ostermiller
  • 98,758
  • 18
  • 137
  • 361

2 Answers2

3

Google doesn't put much (if any) SEO weight on the words in your URL path. Using just a number is not going to hurt your search engine rankings directly.

Using words in your URLs does have some indirect benefits for SEO and usability. See Are keywords in URLs good SEO or needlessly redundant? for full details. In summary:

  • They can help click through rate from the search engine
  • The let users who see the URL have some idea what the URL is about

You can use breadcrumb markup in your pages that shows up instead of the URL in the search results. That will give you the click through rate benefit even if your URLs don't have keywords in them.

When the URLs are percent encoded, you don't get the usability benefit of giving users an idea about your content before clicking whether or not you have a keyword slug.

Using just a number as the URL isn't going to hurt SEO and usability compared to a percent encoded Persian slug. As you point out, it even has some SEO and usability benefits.

I wouldn't recommend using English URLs unless the vast majority of your audience is bilingual. Users tend to get turned off by URLs that are not in a language they understand.

Stephen Ostermiller
  • 98,758
  • 18
  • 137
  • 361
  • "When the URLs are percent encoded, you don't get the usability benefit" - The browser does a good job of hiding the %-encoded URL. The browser tooltip shows the %-decoded URL and the browser's address bar shows the %-decoded URL, except for certain special characters like spaces (%20) etc. You have to view the HTML source to see the %-encoded URL (if indeed it is %-encoded in the HTML source) or look at the network traffic. The "problem" would seem to be with social media if they don't %-decode the visible URL? – MrWhite Dec 18 '20 at 14:04
  • For example... example.com/هارد-اکسترنال (%-encoded in HTML source) – MrWhite Dec 18 '20 at 14:06
  • Until everywhere you paste a URL does a good job of decoding what is visible to the user, URLs with percent encoded international characters are going to present usability challenges. I'm glad to see that at least StackExchange gets it right. – Stephen Ostermiller Dec 18 '20 at 14:53
  • @stephenostermiller Thanks for The answer , it was helpful enough . I've found safari browser does not make UTF8 slugs percent-encoded . for example when i copy UT8 or persian Urls from iphone safari to social medias , link displayed as the actual form in persian and not in %-encoded form , but if i copy link from firefox it will converted to %-encoded . do you know why this happend ? is there any hope that other browsers act like Safari in the future ? – Milad Jafari Dec 18 '20 at 21:02
  • 1
    I'd argue that safari is doing the wrong thing. URLs are not allowed to have international characters in them. (Yes this is unfair, but computers have come a long way at being able to represent all languages since URLs were specified. If the URL spec were written today, it would be different.) If your browser actually requests a URL with an international character (not percent encoded), the web server should throw a "400 Bad Request" error. URLs that are copied out of Safari are invalid. – Stephen Ostermiller Dec 18 '20 at 21:17
  • 1
    Here is a 2015 document from the W3C about what they are doing to allow international characters in URLs: https://www.w3.org/International/wiki/IRIStatus Its unclear if any progress has been made in the last five years, or when this effort will get going again. – Stephen Ostermiller Dec 18 '20 at 22:00
  • I think safari doing it as a special trick . if you copy the URL from safari it will convert it to international chars but if you copy International chars into the safari , it will send request to server as %-encode . actually the Browsers input is important not their output i think . but other browsers does not work like safari and the output is %-encoded . whats your idea ? – Milad Jafari Dec 18 '20 at 22:01
  • I also think this is OS and Social Apps responsible to fix this issue . if their convert %-encoded Chars to International Chars , like the way browsers do that in the address bar , we don't see any %-encoded links anymore . – Milad Jafari Dec 19 '20 at 07:02
1

Its not a great idea from an SEO perspective as it does seem that Google et el take queues about content from the URL - also from them POV of people receiving a URL it hints at the legitimacy of it.

Have you considered a hybrid approach (which is very common) - something like

https://www.example.com/12345/descr-of-site

Of-course WordPress will key off the ID immediately after the URL and the descr-of-site is arbitraryand not considered by WordPress in finding the the but good for SEO. (And normally keyed off the document title)

davidgo
  • 7,904
  • 1
  • 18
  • 26
  • Hybrid approach seems logical but percent-unicode problem still exists . Is there any proved reason google care about keywords in url in 2020 ? I had many researches about it and seems all the information are garbage. – Milad Jafari Dec 18 '20 at 07:17
  • Have a read of https://serp.co/seo/url-structure/ - That would seem to be a reasoned answer - both Matt Cuts and John Mueller would be considered to be answering "on Googles behalf", and the content of this rings true. An updated variant on the theme can be found at https://ignitevisibility.com/breaking-news-keyword-heavy-titles-dont-violate-google-guidelines/ - TLDR - yes, Google cares about keywords in URL's in 2020 - although to what extent is a question of debate. I am not an SEO specialist, but I've not found any information to say its ignored, detrimental or of no importance. – davidgo Dec 18 '20 at 09:13