{"id":21532,"date":"2020-01-30T10:15:02","date_gmt":"2020-01-30T10:15:02","guid":{"rendered":"https:\/\/www.arimetrics.com\/glosario-digital\/slug"},"modified":"2026-09-21T17:29:01","modified_gmt":"2026-09-21T17:29:01","slug":"slug","status":"publish","type":"encyclopedia","link":"https:\/\/www.arimetrics.com\/en\/digital-glossary\/slug","title":{"rendered":"Slug"},"content":{"rendered":"<p><img decoding=\"async\" class=\"boxpad alignright size-full wp-image-14929\" style=\"margin-top:0;\" src=\"https:\/\/www.arimetrics.com\/wp-content\/uploads\/2020\/01\/slug-1.png\" alt=\"Slug\" width=\"300\" height=\"300\" srcset=\"https:\/\/www.arimetrics.com\/wp-content\/uploads\/2020\/01\/slug-1.png 300w, https:\/\/www.arimetrics.com\/wp-content\/uploads\/2020\/01\/slug-1-150x150.png 150w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><strong>Definition:<\/strong><\/p>\n<p>A <strong>slug<\/strong> is the readable segment of a web address that identifies a page, post, category or another resource within a path. In <code>https:\/\/example.com\/guides\/create-a-slug<\/code>, the page slug is <code>create-a-slug<\/code>. It does not include the protocol, domain, query parameters or fragment.<\/p>\n<p>Content management systems commonly generate a slug from the title but usually allow it to be edited. A clear slug helps people recognize the content and supports consistent addresses; by itself, it does not guarantee crawling, indexing or a particular search ranking.<\/p>\n\n<h2>How to identify a slug in a URL<\/h2>\n<p><img decoding=\"async\" class=\"size-full wp-image-1715 alignright\" src=\"https:\/\/www.arimetrics.com\/wp-content\/uploads\/2020\/01\/slug-ejemplo.jpg\" alt=\"Example of a slug within a URL\" width=\"392\" height=\"50\" srcset=\"https:\/\/www.arimetrics.com\/wp-content\/uploads\/2020\/01\/slug-ejemplo.jpg 392w, https:\/\/www.arimetrics.com\/wp-content\/uploads\/2020\/01\/slug-ejemplo-300x38.jpg 300w\" sizes=\"(max-width: 392px) 100vw, 392px\" \/><\/p>\n<p>To locate it, the components of a <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/url\">URL<\/a> should be distinguished:<\/p>\n<ul>\n<li><strong>Protocol or scheme:<\/strong> <code>https<\/code> indicates how the resource is interpreted or requested.<\/li>\n<li><strong>Domain:<\/strong> <code>example.com<\/code> identifies the host where the content is published.<\/li>\n<li><strong>Path:<\/strong> <code>\/guides\/create-a-slug<\/code> organizes the resource within the website.<\/li>\n<li><strong>Slug:<\/strong> <code>create-a-slug<\/code> is the final segment identifying that page within the path.<\/li>\n<\/ul>\n<p>A path can contain several readable segments. In <code>\/shop\/shoes\/blue-trainer<\/code>, <code>shop<\/code> and <code>shoes<\/code> form part of the structure, while <code>blue-trainer<\/code> acts as the product slug. The query <code>?size=42<\/code> and the fragment <code>#reviews<\/code> are not part of the slug.<\/p>\n<h2>Where slugs are used<\/h2>\n<p>A web system may assign slugs to different resource types:<\/p>\n<ul>\n<li><strong>Pages:<\/strong> they identify stable sections such as services, contact details or corporate information.<\/li>\n<li><strong>Posts:<\/strong> they represent articles, news and publications organized by date or topic.<\/li>\n<li><strong>Products:<\/strong> they distinguish items within an ecommerce catalogue.<\/li>\n<li><strong>Categories and tags:<\/strong> they provide addresses for archives and content classifications.<\/li>\n<li><strong>Profiles:<\/strong> they identify authors, users or organizations when those profiles are public.<\/li>\n<li><strong>Other content:<\/strong> they may be applied to events, documentation, locations or custom content types.<\/li>\n<\/ul>\n<p>Context determines whether two resources can use the same text in different paths. A system may accept <code>\/blog\/analytics<\/code> and <code>\/courses\/analytics<\/code>, or add a suffix when it needs to prevent a conflict within the same namespace.<\/p>\n<h2>Best practices for creating a slug<\/h2>\n<ul>\n<li><strong>Describe the content:<\/strong> use words that help people anticipate the page topic or function.<\/li>\n<li><strong>Keep it concise:<\/strong> remove redundant information without imposing one universal word limit.<\/li>\n<li><strong>Use a stable form:<\/strong> avoid dates, states or details likely to change unless they are essential.<\/li>\n<li><strong>Separate words with hyphens:<\/strong> hyphens make compound terms easier to read.<\/li>\n<li><strong>Normalize characters:<\/strong> use lowercase and consistent encoding; non-ASCII characters may appear encoded in some systems.<\/li>\n<li><strong>Avoid noise:<\/strong> do not add identifiers, parameters, repetition or keywords that do not help identify the resource.<\/li>\n<\/ul>\n<p>A slug can form part of a <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/friendly-url\">friendly URL<\/a>, but it does not make the whole address clear by itself. Path length, hierarchy, parameters and site consistency also matter.<\/p>\n<h2>Relationship between slugs and SEO<\/h2>\n<p>The slug contributes to <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/seo\">SEO<\/a> as part of a page address, but it should be assessed alongside content and architecture:<\/p>\n<ul>\n<li><strong>Understanding:<\/strong> a descriptive address gives context to people and systems encountering the link.<\/li>\n<li><strong>Topical match:<\/strong> including the main term when it naturally describes the resource can support consistency.<\/li>\n<li><strong>Sharing:<\/strong> a recognizable URL is easier to review, copy and communicate than an opaque string.<\/li>\n<li><strong>Stability:<\/strong> retaining the address avoids redirects, broken links and signals split between versions.<\/li>\n<\/ul>\n<p>It is not necessary to include every keyword variation or always remove articles and prepositions. Readability and correspondence with the content matter more than repeating terms. An optimized slug does not compensate for a poor, duplicated, inaccessible or irrelevant page.<\/p>\n<h2>Slug, URL, domain and permalink differences<\/h2>\n<ul>\n<li><strong>Slug:<\/strong> the identifying segment usually found at the end of a resource path.<\/li>\n<li><strong>URL:<\/strong> the complete address, including scheme, authority, path and, when present, query and fragment.<\/li>\n<li><strong><a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/domain\">Domain<\/a>:<\/strong> a name in the DNS, such as <code>example.com<\/code>; it does not include the path or slug.<\/li>\n<li><strong><a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/permalink\">Permalink<\/a>:<\/strong> a URL intended to remain stable and provide lasting access to content.<\/li>\n<\/ul>\n<p>These terms are related but not interchangeable. A slug can change without changing the domain, and one permalink structure can generate thousands of URLs with different slugs.<\/p>\n<h2>How to change a slug without causing errors<\/h2>\n<p>Changing the slug of a published page changes its URL. The process should be controlled:<\/p>\n<ol>\n<li><strong>Confirm the need:<\/strong> correcting an error or a problematic structure may justify the change; a marginal improvement may not outweigh the risk.<\/li>\n<li><strong>Define the new address:<\/strong> check that the slug is valid, unique in its context and consistent with the architecture.<\/li>\n<li><strong>Create a <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/301-redirect\">301 redirect<\/a>:<\/strong> direct the old URL to the new one when the resource has moved permanently.<\/li>\n<li><strong>Update internal references:<\/strong> replace links, canonicals, hreflang, structured data and other fields still pointing to the previous version.<\/li>\n<li><strong>Update discovery sources:<\/strong> communicate the new URL through navigation, feeds and the sitemap where applicable.<\/li>\n<li><strong>Verify the result:<\/strong> check the final status code, avoid redirect chains and monitor crawling, indexing and potential <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/404-error\">404 errors<\/a>.<\/li>\n<\/ol>\n<p>A redirect does not automatically update every reference or preserve all performance immediately. Before changing slugs in bulk, URLs, links and traffic should be inventoried so that the move can be validated and reversed if issues appear.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What a URL slug is, how to identify it, where slugs are used, how to create them and what to check before changing one without causing errors.<\/p>\n","protected":false},"author":7,"featured_media":0,"template":"","encyclopedia-tag":[1258],"class_list":["post-21532","encyclopedia","type-encyclopedia","status-publish","hentry","encyclopedia-tag-url-paths"],"_links":{"self":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia\/21532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia"}],"about":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/types\/encyclopedia"}],"author":[{"embeddable":true,"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/users\/7"}],"wp:attachment":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/media?parent=21532"}],"wp:term":[{"taxonomy":"encyclopedia-tag","embeddable":true,"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia-tag?post=21532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}