make the url unlimitedPosted: - Source : stackoverflow
i want in wordpress long unlimited with no char limit
i use plugin wordpress seo
when i try make url like
only 39 char can be make it url
so how we can edit this problem and it have problem with google for long url or its ok?
waiting answer and advice
You might think it's 39 characters long, but it's actually 332 characters long.
This is the real URL you're trying to use:
But Those Aren't Arabic Characters?!
There's no such thing as a true Arabic URL. HTTP requests don't use unicode, and the RFC that determines a valid URL doesn't include non-latin characters.
Then How Do International URLs Work?
Encoding! Each characters UTF value is percent encoded so it fits into the latin character-set. The browser uses this internally but translates for the address bar and tooltips.
So your URL might look like this to you:
But it's actually:
Each percent, e.g.
%D8, represents a code for a non-english character. This is equivalent to UTF-8 prior to percent encoding. The browser hides this by displaying the decoded character in its UI so that you can read it, rather than showing the ugly percent encoded version it's really using.
So What's the Maximum URL Length?
The spec doesn't give a maximum, but software might place limits. If it does there's a HTTP code that indicates the URL is too long.
But what about WordPress?
What's The Maximum Post Slug Length?
This will be determined by the size of the column in the posts table. At the time of writing, the
varchar(200), putting the limit at 200 characters.
Arabic and international post names will be longer than they are written, so multiply the length by 3, which gives a maximum of 66 characters
Can I Increase This Number?
Yes... ish, but at great risk. You can use SQL to manually increase the column size from 200 to a higher value, but when updating WordPress and doing other table operations, WordPress may resize the column back to 200 characters during an upgrade. This would truncate and break all your post slugs and URLs.
Only do this if you're comfortable modifying WordPress Core for every update and security fix. There is no guarantee that WordPress will even use the extra space. If you intend to go down this route, it will be expensive, time consuming, and very easy to break.
Is This Hurting My SEO?
No, Google etc know about this, and handle it fine. But if it did hurt your SEO, it'd hurt every other Arabic site just as much.
WordPress SEO will be counting the characters of the encoded version, not the human readable decoded version, so ignore it and file a bug report with the plugin author
You can back this ticket that's trying to bump the max from 200 to 400 in a future version of WordPress:
- ẪĦmẻḓ MøĦẫmẻḓ @%e1%ba%aa%c4%a6m%e1%ba%bb%e1%b8%93-m%c3%b8%c4%a6%e1%ba%abm%e1%ba%bb%e1%b8%93May 18 at 21:54
thanks for answer , so to edit 200 varchar it make any problem and how open to all posts in database to be 2000 char?
- Tom J Nowell♦ @tom-j-nowellMay 18 at 21:56
Modifying the table schema is not recommended and might cause data loss when updating WordPress when it changes the column size back to 200
The problem the plugin is reporting doesn't exist. As Tom pointed out the URL contains more bytes than 39, but not more characters.
The part after the domain name is encoded in UTF-8, and every search engine knows how to handle that. That's why you will be found when someone is searching for a word that is part of your visible URL. Punycode is used to encode domain names with non-ASCII characters. That doesn't affect you at all.
Ignore the plugin "warning". It's the result of a bug in that plugin, because it is counting bytes, not characters.
- Tom J Nowell♦ @tom-j-nowellMay 18 at 22:05
Copy and paste the URL in the question and you'll get a punycode encoded URL, the page linked to indicates this is the case, percent encoded UTF-8 values
- toscho♦ @toschoMay 18 at 22:06
@TomJNowell Punycode is used for domain names.
- Tom J Nowell♦ @tom-j-nowellMay 18 at 22:08
What you've said about bytes is still incorrect, they're percent encoded UTF-8 values, if it were bytes then we'd be seeing garbled half byte characters. I've ammended my question to mention UTF-8 percent encoding instead though
- toscho♦ @toschoMay 18 at 22:10
A character is a semantic unit, it may be composed of multiple bytes, that's why UTF-8 is a multibyte encoding. Counting the bytes to determine the characters is just wrong.
- Tom J Nowell♦ @tom-j-nowellMay 18 at 22:17
these values aren't literally encoded UTF-8 characters, they're percent encoded, the same way url_encode works. Just the same as you can ampersand encode in HTML. These aren't literal UTF-8 encoded bytes, if they were they'd look very different