SEO & Marketing

An SEO-friendly URL structure

Learn SEO-friendly URL structure with real examples: URL length, keywords, Persian characters in URLs, and how to change URLs without losing rankings. Specifically for Persian websites.

SEO & Marketing

Why Is SEO-Friendly URL Structure Still Important?

In recent years, we've often heard that "Google doesn't care about URLs" or "other factors have become more important." This statement is partially true, but incomplete. Google has officially stated that words in a page's URL are a very minor ranking signal. However, an SEO-friendly URL structure isn't just for Google's bot; it's for the user. A user who sees a short, readable URL is more likely to click, trusts it more, and gives you a higher click-through rate (CTR). And a high CTR indirectly affects rankings.

In this article, instead of generic talk, we'll explain precisely what makes a good URL, what to do about Persian characters in URLs, and how to change old URLs without losing rankings.

URL Length: How Short Should It Be?

A simple rule: the shorter, the better. But what does "short" mean? Statistics show that URLs under 75 characters have better click-through rates in search results. On mobile results, Google usually doesn't show the full URL and only displays the domain and main path. If your URL is 150 characters, users will only see the first few words, and the rest will be truncated with "...".

For Persian websites, there's an important point: Persian characters in URLs are typically stored as Percent-Encoding. For example, the URL /مقالات/سئو appears in the browser as /%D9%85%D9%82%D8%A7%D9%84%D8%A7%D8%AA/%D8%B3%D8%A6%D9%88. This means each Persian character takes about 2 to 3 times the space of an English character. So, a 50-character Persian URL is actually 100 to 150 encoded characters.

Practical Rules for URL Length

  • Maximum 60 to 70 characters for Persian URLs (equivalent to 100 to 120 encoded characters).
  • Maximum 3 to 4 segments in the URL path. For example, /blog/seo/url-structure is good, but /blog/2024/technical/seo/url/guide is too deep.
  • Remove meaningless words like "and," "in," "for," or repetitive words like "articles."

Keywords in URLs: How and Where?

The main keyword should be in the URL, but only once. If your keyword is "URL structure," the URL /seo/url-structure is excellent. But a URL like /seo/url-structure/url-structure-guide looks repetitive and spammy.

An important point for Persian websites: place the keyword at the beginning of the path, not the end. This is because Google gives more weight to words at the beginning of a URL, and users also understand the topic sooner. For example:

Good:  example.com/seo/url-structure
Bad:   example.com/guides/technical/seo/url-structure-final

Also, avoid repeating the keyword in both the domain and the path. If your domain is url-structure.com, you don't need a URL like /url-structure-guide.

LSI Keywords and Synonyms in URLs

You don't need to include all synonyms in the URL. One main keyword is enough. However, if your keyword consists of two words, you can separate them with a hyphen (-). Google treats hyphens as word separators, but it doesn't treat underscores (_) the same way. So, always use -, not _.

Persian Characters in URLs: Yes or No?

This is a question many Persian website managers ask. The short answer: Yes, you can use Persian characters, but with caution. Since 2016, Google has stated that it processes Unicode URLs (including Persian) well. However, there are practical issues:

  1. Copying and sharing: Many users see the percent-encoded version when they copy a Persian URL, which is ugly and long.
  2. Compatibility with some systems: Some social networks, messaging apps, and older systems don't display Persian URLs correctly.
  3. URL length: As mentioned, each Persian character takes 2 to 3 times more space.

Our suggestion: Use English URLs for main and important pages (e.g., /seo/url-structure), and for subpages or blog posts, if the audience is entirely Persian-speaking, a Persian URL is fine. But make sure to use a plugin or script that automatically converts Persian URLs to the encoded version and specifies the original version in the canonical meta tag.

Common Issue: Persian Characters and Zero-Width Non-Joiner (ZWNJ)

In Persian, the zero-width non-joiner (ZWNJ) is part of the word. For example, "میشود" is written with a ZWNJ. In URLs, the ZWNJ is encoded as %E2%80%8C. If your content management system doesn't handle the ZWNJ correctly, it might create URLs like /%D9%85%DB%8C%E2%80%8C%D8%B4%D9%88%D8%AF, which are both long and not displayed correctly in some browsers. The best solution: don't use ZWNJ in URLs and use a hyphen instead. For example, instead of /می‌شود, use /می-شود.

Changing URL Structure Without Losing Rankings

If your website has old, bad URLs (e.g., /p=123 or very long URLs), changing them might be tempting. But changing URLs is one of the riskiest tasks in SEO. If done incorrectly, you'll lose rankings and traffic. Below, we explain the proper method step by step.

Step One: Complete Map of Old and New URLs

Before any changes, create a table listing the old URL, new URL, and keyword for each page. Do this by exporting data from Google Search Console and crawling tools like Screaming Frog. Any URL not in the map should not be changed.

Step Two: 301 Redirect, Not 302

Set up a 301 redirect from each old URL to the new URL. A 301 redirect means "this page has permanently moved," and Google transfers almost all of the PageRank to the new URL. A 302 redirect is temporary and doesn't transfer authority.

On an Apache server, edit the .htaccess file like this:

Redirect 301 /old-url https://example.com/new-url
Redirect 301 /seo/old-guide https://example.com/seo/url-structure

In Nginx, it looks like this:

location = /old-url {
    return 301 https://example.com/new-url;
}

Step Three: Update Internal Links

After setting up the redirects, find all internal links pointing to the old URLs and update them to the new URLs. You can do this with a simple MySQL query (if you use WordPress):

UPDATE wp_posts SET post_content = REPLACE(post_content, 'example.com/old-url', 'example.com/new-url');

Note: Always back up your database before running this query.

Step Four: Update the XML Sitemap

Update the sitemap.xml file with the new URLs and submit the new sitemap in Google Search Console. You can also use the "Change of Address" tool in Search Console, but that tool is only for domain changes, not internal path changes.

Step Five: Monitoring and Patience

After the change, wait at least 2 to 4 weeks. During this period, check the "Coverage" report in Search Console. If you see 404 errors for old URLs, it means the redirect didn't work correctly. You can also use the "URL Inspection" tool to see if Google has indexed the new URL.

Common URL Structure Mistakes

  • Changing URLs without redirects: This is the surest way to lose rankings. Never change a URL unless you've set up a 301 redirect.
  • Using dates in URLs: URLs like /blog/2024/01/15/seo-tips look outdated after a few years, and users lose trust. Remove dates.
  • Duplicate URLs with unnecessary parameters: URLs like /product?id=123&ref=newsletter&utm_source=email are not suitable for main pages. Keep tracking parameters only for campaigns and specify the clean version in the canonical tag.
  • Uppercase and lowercase letters: In URLs, uppercase and lowercase letters are different. /Seo/Url and /seo/url are two different URLs. Always use lowercase letters.

Summary: Final URL Structure Checklist

Before publishing any new page, review this checklist:

  1. Is the URL shorter than 70 characters?
  2. Is the main keyword placed at the beginning of the path?
  3. Are only lowercase letters, numbers, and hyphens used?
  4. Are Persian characters used only when necessary and without ZWNJ?
  5. Does the new URL have a 301 redirect from the old URL (if a previous page existed)?
  6. Are internal links and the sitemap updated?

If you follow these points, your URL structure will be optimized not only for Google but also for users. And if you need to change old URLs, you can do so without losing rankings by following the steps above. If your website is on cloud infrastructure or shared hosting, make sure you can set up redirects in your hosting control panel; otherwise, get help from ServerNet's support team or your hosting company.

ServerNet Support

ServerNet engineering & editorial team — specialists in infrastructure, networking and web hosting.

SEO Services
Share:

Comments 0

No comments yet — be the first!

Leave a comment

Related service

SEO Services

SEO is not a cost, it's an investment. With technical SEO, content strategy and principled link building, ServerNet raises your ranking on Google and builds real, lasting organic traffic.