ShahiTranslate

URL Structures and Permalink Management

Overview

ShahiTranslate Pro offers four URL structure options for multilingual sites. The URL structure affects SEO, user experience, and technical implementation. Choose the right structure for your site’s goals and constraints.

URL Structure Comparison

| Structure | Example | SEO | Setup | Multi-Domain | Recommended |
|———–|———|—–|——-|————–|————-|
| Sub-directory | site.com/es/page/ | ⭐⭐⭐⭐⭐ | Easy | No | ✅ Yes |
| Sub-domain | es.site.com/page/ | ⭐⭐⭐⭐ | Medium | Optional | For large sites |
| Query Parameter | site.com/page/?lang=es | ⭐⭐ | Very easy | No | Quick testing only |
| Custom Domain | sitio.es/page/ | ⭐⭐⭐⭐⭐ | Complex | Required | Enterprise only |

Sub-directory Structure (Recommended)

How It Works

URL Format:
`
English (default): https://example.com/about/
Spanish: https://example.com/es/about/
French: https://example.com/fr/about/
German: https://example.com/de/about/
`

Blog Posts:
`
English: https://example.com/blog/my-article/
Spanish: https://example.com/es/blog/my-article/
French: https://example.com/fr/blog/my-article/
`

WooCommerce:
`
English: https://example.com/product/leather-wallet/
Spanish: https://example.com/es/producto/billetera-de-cuero/
`

Configuration

Enable Sub-directory Structure:

`
Settings → SEO & URLs

URL Structure: [Sub-directory (/es/) ▼]

Language Path Prefix:
☑ Add language code before URL
Format: /{language_code}/{slug}

Examples:
/es/about/
/fr/contact/
/de/produkte/

Save Changes
`

Benefits

SEO Advantages:

    1. ✅ Best for SEO (Google confirmed)
    2. ✅ All languages on same domain
    3. ✅ Domain authority shared across languages
    4. ✅ Easy hreflang implementation
    5. ✅ Single sitemap for all languages
    6. ✅ Google Search Console single property
    7. Technical Benefits:

    8. ✅ Simple to implement
    9. ✅ Works with any hosting
    10. ✅ No SSL certificate complications
    11. ✅ Easy to maintain
    12. ✅ Clear language separation
    13. User Experience:

    14. ✅ Clear which language is active
    15. ✅ Easy to switch languages (just change /es/ to /fr/)
    16. ✅ Bookmarkable language-specific URLs
    17. ✅ Sharable links preserve language
    18. Rewrite Rules

      WordPress Automatically Handles:

      `php
      // Generated rewrite rules
      example.com/es/about/
      → ?lang=es&pagename=about

      example.com/fr/blog/article/
      → ?lang=fr&post_name=article

      example.com/de/produkt/wallet/
      → ?lang=de&post_type=product&name=wallet
      `

      No Manual Configuration Needed

      Default Language URL

      Options for Default Language:

      Option 1: No Language Prefix (Recommended)
      `
      English (default): https://example.com/about/
      Spanish: https://example.com/es/about/
      French: https://example.com/fr/about/
      `

      Option 2: Explicit Language Prefix
      `
      English (default): https://example.com/en/about/
      Spanish: https://example.com/es/about/
      French: https://example.com/fr/about/
      `

      Configuration:
      `
      Settings → SEO & URLs → Advanced

      Default Language in URL:
      ● No prefix (recommended)
      Example: /about/

      ○ Include prefix
      Example: /en/about/
      `

      When to Use Prefix:

    19. Multi-region sites (en-US, en-GB, en-AU)
    20. Equal weight to all languages
    21. Explicit language indication desired
    22. Sub-domain Structure

      How It Works

      URL Format:
      `
      English (default): https://www.example.com/about/
      Spanish: https://es.example.com/about/
      French: https://fr.example.com/about/
      German: https://de.example.com/about/
      `

      Each Language = Separate Sub-domain

      Configuration

      Enable Sub-domain Structure:

      `
      Settings → SEO & URLs

      URL Structure: [Sub-domain (es.site.com) ▼]

      Sub-domain Configuration:
      Main domain: example.com
      Language sub-domains:

    23. es.example.com → Spanish
    24. fr.example.com → French
    25. de.example.com → German
    26. Automatic Setup: ☑ Configure DNS automatically (if supported)
      Manual Setup: ☐ I will configure DNS manually

      Save Changes
      `

      DNS Configuration

      Required DNS Records:

      Add these DNS records in your domain registrar:

      `
      Type | Host | Value | TTL
      ——|——|——————|—–
      A | es | 123.45.67.89 | 3600
      A | fr | 123.45.67.89 | 3600
      A | de | 123.45.67.89 | 3600
      CNAME | es | www.example.com | 3600
      CNAME | fr | www.example.com | 3600
      CNAME | de | www.example.com | 3600
      `

      Replace 123.45.67.89 with your server IP

      Wildcard Sub-domains

      Easier Management:

      `
      DNS Record:
      Type: A
      Host: *
      Value: 123.45.67.89
      TTL: 3600

      Result: All sub-domains (*.example.com) point to same server
      `

      Server Configuration (Apache):
      `apache

      ServerName example.com
      ServerAlias *.example.com
      DocumentRoot /var/www/html

      `

      Server Configuration (Nginx):
      `nginx
      server {
      listen 80;
      server_name example.com *.example.com;
      root /var/www/html;
      }
      `

      Benefits

      SEO Advantages:

    27. ✅ Good SEO (Google treats as related sites)
    28. ✅ Language-specific targeting
    29. ✅ Each language can have separate hosting
    30. ✅ Can have different content per language
    31. Technical Benefits:

    32. ✅ Language isolation
    33. ✅ Separate analytics properties
    34. ✅ Different server configs per language
    35. ✅ Flexible infrastructure
    36. Scalability:

    37. ✅ Each language can scale independently
    38. ✅ Can use different CDNs per language
    39. ✅ Regional server optimization
    40. Limitations

      Complexity:

    41. ❌ More complex setup
    42. ❌ Requires DNS configuration
    43. ❌ Multiple SSL certificates needed (or wildcard SSL)
    44. ❌ Google Search Console multiple properties
    45. SEO Considerations:

    46. ❌ Domain authority split across sub-domains
    47. ❌ Backlinks don’t consolidate
    48. ❌ Each sub-domain builds authority separately
    49. Maintenance:

    50. ❌ More complex analytics setup
    51. ❌ Cookie sharing challenges
    52. ❌ More server configuration
    53. Query Parameter Structure

      How It Works

      URL Format:
      `
      English (default): https://example.com/about/
      Spanish: https://example.com/about/?lang=es
      French: https://example.com/about/?lang=fr
      German: https://example.com/about/?lang=de
      `

      Language via URL Parameter

      Configuration

      Enable Query Parameter Structure:

      `
      Settings → SEO & URLs

      URL Structure: [Query Parameter (?lang=es) ▼]

      Parameter Name: [lang]
      Format: ?lang={language_code}

      Examples:
      ?lang=es
      ?lang=fr
      ?lang=de

      Save Changes
      `

      Benefits

      Simplicity:

    54. ✅ Easiest to implement
    55. ✅ No server configuration needed
    56. ✅ Works instantly
    57. ✅ No DNS changes required
    58. ✅ No rewrite rules needed
    59. Compatibility:

    60. ✅ Works with all hosting
    61. ✅ No SSL complications
    62. ✅ Compatible with all plugins
    63. ✅ Testing friendly
    64. Limitations

      SEO Disadvantages:

    65. ❌ Worst for SEO
    66. ❌ Google may ignore URL parameters
    67. ❌ Duplicate content risk
    68. ❌ Harder to crawl/index
    69. ❌ Not URL-friendly
    70. User Experience:

    71. ❌ Longer URLs
    72. ❌ Less memorable
    73. ❌ Parameter can get lost
    74. ❌ Not bookmarked correctly sometimes
    75. Technical Issues:

    76. ❌ May conflict with other parameters
    77. ❌ Analytics complications
    78. ❌ Social sharing issues
    79. When to Use

      Acceptable For:

    80. 🧪 Testing translation setup
    81. 🚀 Quick prototype
    82. 🛠️ Development environment
    83. 📊 A/B testing translations
    84. Not Recommended For:

    85. ❌ Production sites
    86. ❌ SEO-focused sites
    87. ❌ Professional websites
    88. ❌ E-commerce
    89. Custom Domain Structure

      How It Works

      URL Format:
      `
      English: https://example.com/about/
      Spanish: https://ejemplo.es/acerca-de/
      French: https://exemple.fr/a-propos/
      German: https://beispiel.de/uber-uns/
      `

      Each Language = Separate Domain

      Configuration

      Enable Custom Domain Structure:

      `
      Settings → SEO & URLs

      URL Structure: [Custom Domain (country TLDs) ▼]

      Domain Mapping:
      ┌──────────┬─────────────────────────────┐
      │ Language │ Domain │
      ├──────────┼─────────────────────────────┤
      │ English │ example.com (main) │
      │ Spanish │ ejemplo.es [Edit] │
      │ French │ exemple.fr [Edit] │
      │ German │ beispiel.de [Edit] │
      └──────────┴─────────────────────────────┘

      [+ Add Domain Mapping]

      WordPress Multisite: ☑ Required for this setup

      Save Changes
      `

      WordPress Multisite Setup

      Required:
      Custom domains require WordPress Multisite.

      Setup Steps:

    90. Enable Multisite:
    91. `php
      // wp-config.php
      define(‘WPALLOWMULTISITE’, true);
      `

    92. Install Network:
    93. `
      Tools → Network Setup → Install
      `

    94. Configure Network:
    95. `php
      // wp-config.php
      define(‘MULTISITE’, true);
      define(‘SUBDOMAIN_INSTALL’, false);
      define(‘DOMAINCURRENTSITE’, ‘example.com’);
      define(‘PATHCURRENTSITE’, ‘/’);
      define(‘SITEIDCURRENT_SITE’, 1);
      define(‘BLOGIDCURRENT_SITE’, 1);
      `

    96. Map Domains:
    97. `
      Network Admin → Sites → Add New

      Site URL: ejemplo.es
      Language: Spanish
      `

    98. Domain Mapping Plugin:
    99. Install WordPress MU Domain Mapping or similar

      DNS Configuration

      For Each Domain:

      `
      Domain: ejemplo.es
      DNS Records:
      Type | Host | Value | TTL
      ——|——|—————-|—–
      A | @ | 123.45.67.89 | 3600
      A | www | 123.45.67.89 | 3600

      Domain: exemple.fr
      DNS Records:
      Type | Host | Value | TTL
      ——|——|—————-|—–
      A | @ | 123.45.67.89 | 3600
      A | www | 123.45.67.89 | 3600
      `

      SSL Certificates

      Option 1: Individual Certificates
      `
      example.com → SSL Certificate 1
      ejemplo.es → SSL Certificate 2
      exemple.fr → SSL Certificate 3
      beispiel.de → SSL Certificate 4
      `

      Option 2: Multi-Domain SSL
      `
      One certificate covering:

    100. example.com
    101. ejemplo.es
    102. exemple.fr
    103. beispiel.de
    104. `

      Recommended: Let’s Encrypt (Free SSL for all domains)

      Benefits

      SEO Advantages:

    105. ⭐ Best for local SEO
    106. ⭐ Country-specific domains (.es, .fr, .de)
    107. ⭐ Local search ranking boost
    108. ⭐ Trust signals for local users
    109. ⭐ Each domain ranks independently
    110. Branding:

    111. ✅ Localized brand names
    112. ✅ Regional trust
    113. ✅ Local market positioning
    114. Limitations

      Complexity:

    115. ❌ Most complex setup
    116. ❌ Requires Multisite
    117. ❌ Multiple domain registrations
    118. ❌ Multiple SSL certificates
    119. ❌ Complex maintenance
    120. Cost:

    121. ❌ Domain registration fees (×4-10)
    122. ❌ SSL certificates (or wildcard)
    123. ❌ Potential separate hosting
    124. ❌ Higher maintenance costs
    125. Technical:

    126. ❌ Separate analytics properties
    127. ❌ Cookie/session complications
    128. ❌ Content sync challenges
    129. ❌ More complex deployment
    130. SEO Challenges:

    131. ❌ No domain authority sharing
    132. ❌ Backlinks don’t consolidate
    133. ❌ Must build authority per domain
    134. ❌ More complex hreflang setup
    135. When to Use

      Ideal For:

    136. 🏢 Large enterprises
    137. 🌍 Distinct regional brands
    138. 💰 High-budget projects
    139. 📈 Mature markets with local presence
    140. 🎯 Country-specific strategies
    141. Not For:

    142. ❌ Small-medium businesses
    143. ❌ Limited budgets
    144. ❌ Single-brand strategy
    145. ❌ New market entry
    146. URL Translation (Slug Translation)

      Enable URL Translation

      Translate URL Slugs:

      `
      Settings → SEO & URLs

      ☑ Enable URL translation

      What gets translated:
      ☑ Page slugs
      ☑ Post slugs
      ☑ Category slugs
      ☑ Product slugs
      ☐ Tag slugs (optional)

      Translation method:
      ● Automatic (Google Translate)
      ○ Manual only
      `

      Examples

      Without URL Translation:
      `
      English: example.com/about-us/
      Spanish: example.com/es/about-us/ (English slug)
      French: example.com/fr/about-us/ (English slug)
      `

      With URL Translation:
      `
      English: example.com/about-us/
      Spanish: example.com/es/acerca-de/ (Spanish slug)
      French: example.com/fr/a-propos/ (French slug)
      `

      Manual Slug Override

      Custom URL Slugs:

      `
      Edit Page: “About Us”

      Permalink: /about-us/

      ShahiTranslate Pro → URL Translation:
      ┌──────────┬──────────────────────────┐
      │ Language │ URL Slug │
      ├──────────┼──────────────────────────┤
      │ Spanish │ /acerca-de/ [Edit] │
      │ French │ /a-propos/ [Edit] │
      │ German │ /uber-uns/ [Edit] │
      └──────────┴──────────────────────────┘

      [Auto-Generate] [Save]
      `

      Benefits

      SEO:

    147. ✅ Better local SEO
    148. ✅ Keyword optimization per language
    149. ✅ Natural-looking URLs
    150. User Experience:

    151. ✅ URLs make sense to local users
    152. ✅ More professional appearance
    153. Risks

      Technical:

    154. ⚠️ Breaks existing links
    155. ⚠️ Requires 301 redirects
    156. ⚠️ More complex URL management
    157. ⚠️ Potential duplicate content if not configured correctly
    158. Recommendation:

    159. ✅ Enable for new sites
    160. ⚠️ Careful migration for existing sites
    161. ✅ Set up redirects from old URLs
    162. Choosing the Right Structure

      Decision Framework

      Question 1: What’s your SEO priority?

    163. High: Sub-directory
    164. Very High + Local Markets: Custom domains
    165. Medium: Sub-domains
    166. Low/Testing: Query parameters
    167. Question 2: What’s your technical expertise?

    168. Beginner: Sub-directory or Query parameter
    169. Intermediate: Sub-directory or Sub-domain
    170. Advanced: Sub-domain or Custom domain
    171. Question 3: What’s your budget?

    172. Limited: Sub-directory (single domain)
    173. Moderate: Sub-directory or Sub-domain
    174. High: Custom domains (multiple domains)
    175. Question 4: Multi-region strategy?

    176. Single brand: Sub-directory
    177. Regional variations: Sub-domain
    178. Completely localized: Custom domains
    179. Question 5: Is site already live?

    180. New site: Any structure
    181. Existing site: Sub-directory (easiest migration)
    182. Large existing site: Careful planning needed
    183. Recommendations

      Most Businesses:
      `
      ✅ Sub-directory structure
      Why: Best SEO, easy setup, low cost
      `

      Large Enterprises:
      `
      ✅ Sub-domain or Custom domain
      Why: Scale, regional independence, infrastructure flexibility
      `

      Quick Prototype/Testing:
      `
      ✅ Query parameter
      Why: Fastest setup, no configuration
      ⚠️ Switch to sub-directory before launch
      `

      Local Market Focus:
      `
      ✅ Custom domain (.es, .fr, .de)
      Why: Local trust, SEO advantage
      `

      Migration Between Structures

      From Query Parameter to Sub-directory

      Safe Migration:

      `

    184. Enable sub-directory structure:
    185. Settings → SEO & URLs → Sub-directory

    186. Set up 301 redirects:
    187. /about/?lang=es → /es/about/

    188. Update internal links
    189. Submit new sitemap to Google
    190. Monitor for issues (1-2 weeks)
    191. Remove old structure
    192. `

      Redirect Code:
      `php
      function stpmigratequerytosubdirectory() {
      if ( isset( $GET[‘lang’] ) && ! pregmatch( ‘#^/[a-z]{2}/#’, $SERVER[‘REQUESTURI’] ) ) {
      $lang = sanitizetextfield( $_GET[‘lang’] );
      $newurl = ‘/’ . $lang . $SERVER[‘REQUEST_URI’];
      $newurl = removequeryarg( ‘lang’, $newurl );
      wpredirect( $newurl, 301 );
      exit;
      }
      }
      addaction( ‘templateredirect’, ‘stpmigratequerytosubdirectory’ );
      `

      From Sub-domain to Sub-directory

      Complex Migration:

      `

    193. Plan thoroughly (affects DNS, SEO)
    194. Set up redirects on old sub-domains:
    195. es.example.com/page/ → example.com/es/page/

    196. Update all internal links
    197. Change hreflang tags
    198. Submit updated sitemap
    199. Monitor analytics and rankings (4-8 weeks)
    200. Keep redirects permanently
    201. `

      Next Steps

    202. SEO Settings
    203. URL Translation Setup
    204. Rewrite Rules
    205. Migration Guide

Share this article

Was this article helpful?

Help us improve our documentation

Still need help?

Our support team is ready to assist you with personalized guidance for your workspace.

Submit a support ticket