A URL, or Uniform Resource Locator, is the unique address of every page, image, and file on the internet. Think of it like your website’s digital street address, guiding visitors and search engines to the right content. Understanding how URLs work and following best practices for their structure is not only essential for making your website easily navigable but also plays a key role in search engine optimization (SEO).

In this guide, we’ll dive into what makes up a URL, the rules to follow, and how to craft URLs that boost both user experience (UX) and your search engine rankings. 

Understanding URL Structure 

Here’s where we’ll break down the anatomy of a URL. Think of this section as the blueprint for any well-formed web address.

The Protocol

Every URL starts with a protocol, the most common being:

  1. HTTP (Hypertext Transfer Protocol): The standard protocol for unencrypted web communication. It’s essential for basic web browsing but offers limited security.
  2. HTTPS (Hypertext Transfer Protocol Secure): This enhanced version of HTTP adds an encryption layer (SSL/TLS) to protect data transmitted between your website and users’ browsers. HTTPS is especially crucial for websites handling sensitive data like logins, payments, or personal information.

Why HTTPS Matters

  1. Security: HTTPS safeguards against eavesdropping and data tampering, ensuring users’ information stays private.
  2. SEO: Search engines like Google give HTTPS-secured websites a ranking boost, recognizing their commitment to user security.
  3. User Trust: Seeing the “HTTPS” and padlock icon in their browser inspires more trust in visitors.
  4. Performance: Modern web technologies like HTTP/2 often require HTTPS, leading to potential speed benefits.

HTTPS by Default: Elementor Hosting takes the worry out of HTTPS setup. Every website hosted on their platform automatically receives a free SSL certificate (worth 60$) and has HTTPS enabled by default. This means you get enhanced security and SEO advantages without the need for technical configuration.

The Domain Name

Your domain name is the unique identifier for your website, like the street name in your website’s address. It typically consists of two main parts:

  1. Second-level Domain (SLD): This is the core name you choose, often reflecting your brand or website’s purpose (e.g., “elementor” in “elementor.com”).
  2. Top-level Domain (TLD): This refers to the extension at the end (e.g., .com, .org, .net, etc.). There are many TLDs available, some generic, some country-specific, and others niche-focused.

Types of Domains

Here are some examples to illustrate the variety of domain names:

  1. Generic TLDs: .com, .net, .org
  2. Country Code TLDs (ccTLDs): .uk, .ca, .au
  3. New and Sponsored TLDs: .blog, .photography, .xyz

Choosing the Right Domain for You

  • Relevance: Match your domain to your brand or website’s focus.
  • Memorability: It should be easy to remember and spell.
  • Availability: Check if your desired domain name is still available.
  • TLD Considerations: .com is often a safe choice, but other TLDs can work if relevant to your niche.

The Path

The path in a URL pinpoints the specific location of a page, file, or resource within your website’s directory structure. It follows the domain name and uses forward slashes (/) to separate directories and subdirectories.


In the URL https://www.elementor.com/blog/url-structure/, the path is /blog/url-structure/. This likely indicates a blog post titled “URL Structure” within the “Blog” section of the Elementor website.

Understanding File Paths and Directories

Think of your website as a filing cabinet:

  • Directories: The folders within the cabinet.
  • Subdirectories: Folders within other folders, creating a hierarchy.
  • Files: The individual documents (pages, images, etc.) within folders.

How the Path Impacts Navigation and Organization

  1. User-Friendly Navigation: A well-structured path creates a logical flow within your website, making it easier for visitors to find what they need.
  2. SEO Signals: Clear paths can help search engines understand your website’s hierarchy and content organization, improving search rankings.

Query Parameters

Query parameters are additions to a URL often used to pass specific information or instructions to a website. They start with a question mark (?) and come in key-value pairs separated by ampersands (&).



In this example:

  • q is a parameter representing the search query (“URL best practices”).
  • category is a parameter specifying the content category (“SEO”).

How Query Parameters Are Used

  1. Filtering and Sorting: Dynamically refine product lists or blog archives based on user selections (e.g., size, color, price range).
  2. Search: Pass a user’s search terms to the website’s search engine.
  3. Pagination: Indicate the current page number in a series (e.g., page=2).
  4. Tracking: Add campaign tracking codes to monitor traffic sources (often hidden from the user).

Query Parameters and SEO: Potential Considerations

  1. Duplicate Content: Excessive use of query parameters can create multiple URL variations pointing to the same or very similar content. This can lead to search engine confusion.
  2. Crawling: Search engines may not index every possible parameter combination, potentially limiting the discoverability of some content on your website.


Fragments act as anchors within a single web page. They start with a hash symbol (#) and identify a specific section on a page. Clicking a link with a fragment tells the browser to jump to that particular section.



In this example, the fragment #team-section would likely direct the user to the “Team” section of the “About Us” page.

How Fragments Are Used

  1. On-page Navigation: Create table of contents links or “jump to” navigation for long pages.
  2. Preserving Scroll Position: Allow users to return to a specific spot on a page after refreshing or navigating away.

Fragments and SEO

It’s important to note that search engines generally ignore the part of a URL after the fragment symbol. They primarily focus on the base URL when indexing content.

URL Syntax – The Rules to Follow

While there’s some flexibility in how URLs are constructed, there are specific rules to follow to ensure they work correctly across browsers and are understood by search engines. Here’s the breakdown:

Allowed Characters

Unreserved Characters

These can be used freely in URLs.

  1. Letters: A-Z, a-z
  2. Numbers: 0-9
  3. Special Characters: – . _ ~

Reserved Characters

Have special meanings within URLs (/, ?, #, etc.). If you need to use them as part of your page or file names, they must be encoded.


Percent encoding is a mechanism to represent reserved characters. It involves replacing a reserved character with a percent sign (%) followed by the character’s two-digit hexadecimal code.


A space character encoded becomes %20.

When Percent-Encoding Happens

  1. Most web servers and browsers handle encoding automatically when spaces or special characters are used in file names or in URLs created through website builders.
  2. You may need to manually encode characters if you’re constructing URLs from scratch.

Case Sensitivity

Technically, URLs can be case-sensitive. This means that Elementor.com and Elementor.com could be in different places. However, it’s widely considered best practice to:

  1. Stick to Lowercase: Promotes consistency and avoids confusion.
  2. Treat URLs as Case-Sensitive on Your Server: Ensure your web server correctly handles variations in case, especially for files.

Additional Syntax Considerations

  1. URL Length: While there’s no hard technical limit, browsers and servers may have restrictions on how long a URL can be.
  2. Best Practice: Keep URLs as concise as possible while still being descriptive. This improves both readability and the likelihood of them being correctly shared and indexed.

Underscores or Hyphens?

Both are technically allowed in URLs.

  1. Hyphens (-) are generally preferred: Search engines treat hyphens as word separators, aiding in understanding the content of your URLs. Underscores can be misinterpreted as part of a single word.

Types of URLs

Absolute vs. Relative URLs

Absolute URLs

Contain the full path to a resource, including the protocol, domain name, and any path or file name (e.g., https://www.elementor.com/blog/hello-world/). They specify the exact location on the web.

Relative URLs

Only specify the path relative to the current page (e.g., /blog/hello-world/). They are dependent on the base URL of the page they’re located on.

When to Use Each

Absolute URLs

  1. Linking to external websites.
  2. Ensuring links always point to the correct location, even if the website structure changes.

Relative URLs

  1. Linking between pages within your own website.
  2. Potentially improving page load speed (since the browser doesn’t need to re-resolve domain information).

Static vs. Dynamic URLs

  • Static URLs: Directly correspond to a physical file on the web server (e.g., https://www.example.com/about.html). They have a fixed structure.
  • Dynamic URLs are generated on the fly by the web server, often using query parameters (e.g., https://www.shop.com/products?category=shoes&size=10). Their structure can change based on user input or database content.

SEO Considerations for Dynamic URLs

  1. Clarity: Make sure dynamic URLs are descriptive and avoid overly complex parameter structures if possible.
  2. Canonicalization: Use canonical URLs to signal the preferred version of a page when multiple URL variations might lead to the same content.
  3. Crawlability: Ensure search engines can understand and follow your dynamic URLs.

URL Best Practices for UX and SEO

Crafting well-structured URLs not only makes your website more user-friendly but also influences how search engines perceive your content. Let’s break down the key elements:

Clarity and Readability

  1. Descriptive Words: Use keywords that accurately reflect the page’s content (e.g., /wordpress-hosting-guide/ is clearer than /page123.html).
  2. Separation: Choose hyphens (-) to separate words for improved readability.
  3. Avoid Keyword Stuffing: Don’t cram in unnecessary keywords; URLs should flow naturally.

Keyword Optimization

  1. Relevance: Include your target keywords thoughtfully within your URLs where they make sense.
  2. Position: Placing keywords closer to the beginning of the URL may carry slightly more weight.
  3. Don’t Overdo It: Focus on a primary keyword or phrase per URL.

Practical Length Considerations

  1. Conciseness: Aim for URLs that users can easily read, remember, and share.
  2. Balance: Be descriptive but avoid excessively long URLs.
  3. No Unnecessary Words: Remove filler words like “the,” “and,” etc., if they don’t add meaning.

Hierarchical Structure

A well-organized URL structure reflects the organization of your website’s content. Think of it as a logical filing system.



  1. flowers: Category
  2. annuals: Subcategory
  3. planting-guide: Specific page

Benefits for UX and SEO

  1. Improved Navigation: Users can easily understand where they are on your site and the relationship between pages.
  2. Breadcrumbs: Hierarchical URLs make creating clear breadcrumb navigation simpler.
  3. SEO Signals: Search engines can better understand the context and topical relationships of your content.


Maintaining consistency in how you format your URLs benefits both users and search engines. Here’s why it matters:

  1. User Expectations: Predictable URL patterns make your site easier to navigate and instill trust in your users.
  2. Avoiding Confusion: Changing URL structures haphazardly can break existing links and cause frustration if users have bookmarked pages.
  3. SEO Benefits: Search engines may favor websites with consistent URL patterns, as it demonstrate organization and attention to detail.

Key Areas for Consistency

  1. Case Usage: Choose lowercase URLs and stick with that decision.
  2. Hyphens vs. Underscores: Pick one and use it consistently.
  3. Trailing Slashes: Decide whether to include a trailing slash (/) at the end of directory URLs and adhere to your chosen convention. (e.g., /blog/ vs. /blog).

Avoiding Changes (When Possible)

URLs are designed to be long-term addresses for your content. Changing them unnecessarily can have negative consequences:

  1. Broken Links: External websites, bookmarks, and old social media shares pointing to the original URL will lead to 404 errors.
  2. Loss of SEO Value: Search engines may take time to re-index the page at its new address, and any link authority built up to the old URL needs to be recovered.

When URL Changes are Necessary

Sometimes, URL changes can’t be avoided, such as:

  1. Website Restructuring: Major changes to your content organization might warrant URL adjustments.
  2. Rebranding: A new domain name might necessitate a complete URL overhaul.
  3. Fixing Typos or Unwieldy URLs: Correcting significant errors in a URL might be worth the trade-off.

301 Redirects: Your Best Friend

The key to minimizing the impact of URL changes is using 301 redirects:

  • How they work: A 301 redirect tells browsers and search engines that a page has permanently moved to a new location. It automatically forwards users and passes on most of the original URL’s SEO value.

Types of Redirects

  1. Page-Level Redirects: Redirect individual old URLs to their new counterparts.
  2. Directory Redirects: Redirect entire sections of your website if the structure has changed.

URLs in the WordPress Context 

WordPress Permalinks

WordPress offers flexible control over the structure of your URLs through its permalink settings. Understanding these settings is essential for any WordPress website owner.

Permalink Settings Explained

Located in your WordPress dashboard under Settings > Permalinks, you’ll find the following common options:

  1. Plain: URLs based on post IDs, not user- or SEO-friendly.
  2. Day and Name: Includes the date and post title.
  3. Month and Name: Similar to above but includes the month.
  4. Numeric: Numeric archives are used rather than descriptive names.
  5. Post Name: Cleanest option, using just the post or page title. (Generally recommended for SEO).
  6. Custom Structure: Advanced option for fine-grained control.

Best Practices for WordPress Permalinks

  1. Choose Descriptive Structures: Post Name or other structures that include keywords are often optimal.
  2. Set Them Early: Make decisions before creating much content to avoid having to change URLs later.


You already know that redirects are crucial when you need to change URLs. Here’s how to manage them effectively:

When to use 301 vs. 302 Redirects

  • 301 (Permanent Redirect): Use for changes you intend to keep long-term. This signals to search engines that the old page is gone and the new one is its permanent replacement.
  • 302 (Temporary Redirect): This is used for situations where the URL change might be reversed in the future, such as during website maintenance or testing.

Additional Considerations

  1. External Redirects: For redirects involving domains outside of your WordPress site, you may need to modify your server configuration (.htaccess for Apache servers).
  2. Plugins: Specialized redirection plugins offer even more advanced features and bulk redirect tools.


Canonicalization refers to the process of selecting the “preferred” version of a URL when multiple URLs could potentially lead to the same content.

Why Canonicalization Matters

  1. Duplicate Content: Search engines might get confused if similar content is accessible at multiple URLs. Canonicalization signals which version is the “original.”
  2. Consolidating Link Equity: Ensures that backlinks and other ranking signals are focused on the preferred URL, maximizing its SEO potential.

Common Scenarios Requiring Canonicalization

  1. WWW vs. non-WWW: (e.g., https://www.elementor.com and https://elementor.com)
  2. HTTPS vs. HTTP: Especially when both versions of your website are accessible.
  3. Trailing Slash Inconsistencies: (e.g., /blog/ vs. /blog)
  4. Parameter Variations: When query parameters change the order of content but not the core content itself.
  5. Pagination: In multi-page archives, specify the canonical for the main/first page.

Setting Canonical URLs

There are two main ways to indicate canonical URLs:

  1. Rel=”canonical” Link Tag: Add <link rel=”canonical” href=”https://www.elementor.com/preferred-page/” /> within the <head> section of non-canonical pages.
  2. HTTP Header: Less common, send a Link: <https://www.elementor.com/preferred-page/>“; rel=”canonical” header in the web server’s response.


By now, you understand that URLs are much more than just addresses. They play a significant role in how users interact with your website and how search engines perceive it.

By following URL best practices and harnessing the power of Elementor and WordPress, you set your website up for enhanced user experience, improved search engine visibility, and, ultimately, greater online success.