05 / URLs
URLs are the addresses that identify pages and resources on the web. A well-organized URL structure helps visitors understand where they are, helps search engines discover and interpret pages, and makes a website easier to maintain as it grows.
Understanding URLs also means knowing how redirects, canonical URLs, and HTTPS work together. These elements help search engines handle changes in page locations, identify preferred versions of content, and access pages securely.
What is a URL?
A URL (Uniform Resource Locator) is the address used to locate a resource on the internet. Every accessible web page has a URL that tells a browser where to request the resource and how to access it. For example: https://www.example.com/blog/technical-seo/
Anatomy of a URL
| Component | Purpose |
|---|---|
https:// | Protocol used to access the resource securely. |
www.example.com | Domain name identifying the website. |
/blog/ | Directory or path indicating the page's location in the site structure. |
technical-seo/ | Final path segment, often called the slug, identifying the specific resource. |
URLs can also include query parameters and fragments. For example, ?category=seo may pass information to a page, while #technical-audit can point to a specific section within it.
URL structure
URL structure refers to how the addresses of a website's pages are organized. A consistent structure can make the relationship between pages easier for visitors to understand and help search engines discover pages through internal links. Consider a website that publishes educational content about SEO:
Example website hierarchy
Illustrative URL hierarchy. Actual URL paths do not have to mirror the navigation exactly.
Principles of readable URLs
- Use descriptive words: choose words that communicate the page's topic, such as
/academy/crawling/, rather than arbitrary strings or IDs. - Keep URLs concise: remove unnecessary words and repeated folder names where practical.
- Use hyphens between words: hyphens separate words in URL paths, such as
/technical-seo/, while underscores and spaces are harder to read. - Maintain consistency: follow a predictable naming convention, including lowercase letters and a consistent trailing slash, across similar pages.
- Avoid unnecessary parameters: use query strings only when they serve a purpose, such as filtering, sorting, or tracking.
Readable URLs are useful for people, but there is no requirement that every URL be short or contain a specific number of keywords. Search engines can process many different URL formats.
URL structure and crawling
Search engines discover URLs through links, XML sitemaps, and other discovery mechanisms. A clear site architecture and relevant internal links can make it easier for crawlers to find important pages and understand how they relate to one another.
For example, linking from an SEO fundamentals page to a crawling lesson creates a path for visitors and crawlers to reach that lesson. However, a folder hierarchy alone does not guarantee that a page will be crawled or indexed.
Redirects
A redirect sends visitors and crawlers from one URL to another. Redirects are commonly used when a page moves, a website changes its URL structure during a site migration, or multiple versions of a page need to be consolidated. For example, a website might move a page from https://example.com/seo-tips/ to https://example.com/academy/seo-tips/. A redirect sends requests for the old URL to the new one, helping visitors reach the relocated content and allowing search engines to process the change.
Common redirect types
| Status code | Description | Typical use |
|---|---|---|
| 301 | Permanent redirect | A page has moved permanently. |
| 302 | Temporary redirect | A page is temporarily available at another URL. |
| 307 | Temporary redirect that preserves the request method | Temporary moves where method preservation matters. |
| 308 | Permanent redirect that preserves the request method | Permanent moves where method preservation matters. |
For ordinary page migrations, 301 redirects are commonly used to indicate that a URL has permanently moved. Temporary redirects are appropriate only when the change is genuinely temporary.
Redirect chains and loops
A redirect chain occurs when one URL redirects to another, which then redirects again before reaching the final destination.
Redirect chain
/old-page//updated-page//final-page/ is the final destination.A direct redirect from the old URL to the final destination avoids unnecessary hops.
A redirect loop happens when URLs redirect to one another repeatedly, preventing the browser or crawler from reaching a final page. When auditing a website, look for:
Redirect chains
Multi-hop redirects that can be shortened to a single hop.
Redirect loops
URLs that redirect to each other and prevent access to a page.
Irrelevant destinations
Redirects pointing to incorrect pages or broken targets.
Outdated internal links
Internal links that still point to redirected URLs instead of the final destination.
Redirected URLs in sitemaps
XML sitemaps listing redirected URLs when the final destination should be listed instead. See these XML sitemap errors and fixes.
Sending many unrelated old URLs to the homepage can create a poor user experience and may not preserve the intended relationship between pages. Redirect each old URL to its closest equivalent.
Canonical URLs
A canonical URL is the preferred URL that a website identifies for a page when multiple URLs contain identical or very similar content. For example, the following URLs might display the same product listing:
https://example.com/shoes/https://example.com/shoes/?sort=pricehttps://www.example.com/shoes/
Depending on the website's setup, these URLs may represent the same content or different views of it. A canonical link element placed in the HTML document's <head> section can indicate which URL should be treated as the preferred version:
<link rel="canonical" href="https://example.com/shoes/" />
Canonicalization is a signal, not a directive. Search engines may choose a different canonical URL based on other evidence, such as internal links, redirects, and sitemap entries.
When canonical URLs are useful
- When a page is accessible through multiple URL variations, such as www and non-www versions.
- When tracking or sorting parameters create alternate URLs for the same content.
- When similar pages need a clear preferred version.
- When managing duplicate or near-duplicate content across a website.
Canonical tags and redirects are different
A canonical tag suggests which URL should be preferred for indexing. A redirect actually sends a request from one URL to another.
| Canonical URL | Redirect |
|---|---|
| Signals the preferred URL to search engines. | Sends visitors and crawlers to a different URL. |
| Usually allows the alternate URL to remain accessible. | The original URL normally forwards to the destination. |
| Useful when alternate URLs need to remain available. | Useful when a URL has moved or should no longer be accessed directly. |
For example, a filtered product listing might need to remain accessible to visitors, while the canonical tag points to the main category page. If an old article has permanently moved and should no longer be served at its previous address, a redirect may be more appropriate.
Self-referencing canonicals
A self-referencing canonical is a canonical tag that points to the URL of the page on which it appears. It makes the preferred URL explicit, especially on websites with complex URL handling. For example, a page at https://example.com/academy/urls/ may contain:
<link rel="canonical" href="https://example.com/academy/urls/" />
Canonical tags should use absolute URLs, and the chosen canonical should be consistent with internal links, redirects, and sitemap entries. See these canonical tag problems and fixes.
HTTPS
HTTPS (Hypertext Transfer Protocol Secure) is the secure version of HTTP. It uses TLS encryption to protect data exchanged between a browser and a website. A URL beginning with https:// indicates that the browser is connecting using HTTPS.
HTTPS helps protect the confidentiality and integrity of data in transit and helps users verify that they are communicating with the intended website when the SSL/TLS certificate is valid.
HTTP vs. HTTPS
| HTTP | HTTPS |
|---|---|
| Data is not encrypted by the protocol itself. | Data is encrypted in transit using TLS. |
Uses http:// in the URL. | Uses https:// in the URL. |
| Does not provide TLS certificate authentication. | Uses a certificate to authenticate the website's identity. |
| Not suitable for protecting sensitive information in transit. | Helps protect sensitive information in transit. |
HTTPS is a lightweight ranking signal in Google's search systems, but having HTTPS alone does not guarantee higher rankings.
HTTPS migration checklist
- Install a valid certificateHTTPS pages load successfully without certificate warnings.
- Redirect HTTP to HTTPSEvery HTTP URL redirects to its HTTPS equivalent with a single 301.
- Update internal linksInternal links point directly to HTTPS URLs.
- Update canonicals and sitemapsCanonical tags and XML sitemaps reference the preferred HTTPS URLs.
- Fix mixed contentHTTPS pages do not load important resources over insecure HTTP.
A mixed content issue occurs when an HTTPS page loads certain resources, such as images or scripts, over an unencrypted HTTP connection. Depending on the resource and browser, this can trigger security warnings or cause content to be blocked.
Auditing URL structure
A technical SEO audit can help identify URL-related issues that make a website harder to crawl, maintain, or navigate.
URL audit checklist
0 of 9 checks completed
Use SiteAuditLint to crawl your website, find redirect chains and loops, check status codes, and identify canonical and HTTPS issues such as mixed content. Reviewing these findings alongside internal links, sitemaps, and page content helps distinguish technical problems from intentional URL variations.
Knowledge check
Test what you learned about URL structure, redirects, canonical tags, and HTTPS.
Key takeaways
- URLs identify resources and provide a navigable structure for websites.
- Consistent, descriptive URL paths can improve usability and make a site's organization easier to understand.
- Redirects handle URL changes and consolidate access to relocated pages; avoid chains and loops.
- Canonical tags signal the preferred URL when duplicate or similar pages exist.
- HTTPS encrypts data in transit and is an important part of a secure website.
- URL structure, redirects, canonicals, and HTTPS should be checked together during technical SEO audits.
Ready to go further? Work through the technical SEO checklist to review your site's URLs alongside other technical health checks.