Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Gestire la scansione degli URL di navigazione per facet
La navigazione per facet è una funzionalità comune dei siti web che consente ai visitatori di modificare il modo in cui gli elementi (ad esempio prodotti, articoli o eventi) vengono visualizzati in una pagina. Si tratta di una funzionalità molto apprezzata e utile, ma la sua implementazione più comune, basata sui parametri URL, può generare URL infiniti che danneggiano un sito web in due modi:
Scansione eccessiva: poiché gli URL creati per la navigazione per facet sembrano essere nuovi e i crawler non possono determinare se saranno utili senza eseguire prima la scansione, in genere accedono a un numero molto elevato di URL di navigazione per facet prima che i processi dei crawler determinino che gli URL sono in realtà inutili.
Scansioni di rilevamento più lente: in base al punto precedente, se la scansione viene eseguita su URL inutili, i crawler hanno meno tempo da dedicare a nuovi URL utili.
Un tipico URL di navigazione per facet potrebbe contenere vari parametri nella stringa di query relativi alle proprietà degli elementi per i quali vengono applicati i filtri. Ad esempio:
La modifica di uno dei parametri URL products, color e
size mostrerà un insieme diverso di elementi nella pagina sottostante. Spesso si tratta di un numero molto elevato di possibili combinazioni di filtri, che si traduce in un gran numero di possibili URL. Per risparmiare risorse, ti consigliamo di gestire questi URL in uno dei seguenti modi:
Se non hai bisogno che gli URL di navigazione per facet vengano potenzialmente indicizzati, impedisci la scansione di questi URL.
Se vuoi che gli URL di navigazione per facet vengano potenzialmente indicizzati, assicurati che rispettino le nostre
best practice descritte nella sezione seguente. Tieni presente che la scansione degli URL con facet tende a comportare un costo elevato in termini di risorse di calcolo per i siti a causa della grande quantità di URL e operazioni necessarie per il rendering di queste pagine.
Impedire la scansione degli URL di navigazione per facet
Se vuoi risparmiare risorse del server e non hai bisogno che gli URL di navigazione per facet vengano visualizzati nella Ricerca Google, puoi impedire la scansione di questi URL in uno dei seguenti modi.
Utilizza il file robots.txt per impedire la scansione degli URL di navigazione per facet. Spesso
non c'è un motivo valido per consentire la scansione degli articoli filtrati, in quanto consuma risorse del server senza alcun beneficio o con un beneficio trascurabile; invece, consenti la scansione solo delle pagine dei singoli articoli e di una pagina di elenco dedicata che mostri tutti i prodotti senza filtri applicati.
Altri modi per indicare una preferenza su quali URL di navigazione per facet (non) sottoporre a scansione sono l'utilizzo
dell'elemento rel="canonical"link e dell'attributo anchor rel="nofollow". Tuttavia, questi metodi in genere sono meno efficaci a lungo termine rispetto ai metodi
sopra menzionati.
L'utilizzo di rel="canonical"
per specificare quale URL è la versione canonica di un URL di navigazione per facet
potrebbe, nel tempo, ridurre il volume di scansione delle versioni non canoniche di questi URL. Ad esempio,
se hai tre tipi di pagine filtrate, valuta la possibilità di indirizzare rel="canonical" alla
versione non filtrata:
https://example.com/items.shtm?products=fish&color=radioactive_green&size=tiny
specifica <link rel="canonical" href="https://example.com/items.shtm?products=fish" >.
L'utilizzo degli attributi
rel="nofollow"
sugli anchor che rimandano a pagine di risultati filtrati
può essere utile, ma tieni presente che ogni anchor che rimanda a un URL specifico deve avere
l'attributo rel="nofollow" per essere efficace.
Assicurati che gli URL di navigazione per facet siano ottimali per il web
Se vuoi che gli URL di navigazione per facet siano potenzialmente sottoposti a scansione e indicizzati, assicurati di seguire queste best practice per ridurre al minimo gli effetti negativi della scansione del numero elevato di potenziali URL sul tuo sito:
Utilizza il separatore dei parametri URL standard di settore "&". I caratteri come la virgola (,), i due punti (;) e le parentesi ([ e ]) sono difficili da rilevare dai crawler come separatori di parametri (perché molto spesso non lo sono).
Se codifichi i filtri nel percorso dell'URL, ad esempio
/products/fish/green/tiny,
assicurati che l'ordine logico dei filtri rimanga sempre invariato e che non esistano filtri duplicati.
Restituisci un codice di stato HTTP 404 quando una combinazione di filtri non restituisce risultati.
Se non sono presenti pesci verdi nell'inventario del sito, gli utenti e i crawler dovrebbero ricevere un
errore "non trovato" con il codice di stato HTTP corretto (404). Lo stesso dovrebbe accadere anche se l'URL contiene filtri duplicati o combinazioni di filtri non sensate e URL di paginazione inesistenti. Analogamente, se una combinazione di filtri non genera risultati, non reindirizzare
a una pagina di errore "non trovato" comune. Pubblica invece un errore "non trovato" con il codice di stato HTTP 404
nell'URL in cui è stato rilevato.
[null,null,["Ultimo aggiornamento 2025-08-04 UTC."],[],["Faceted navigation URLs, often using parameters, can lead to overcrawling and slower discovery of new content. To manage this, prevent crawling of these URLs using `robots.txt` to disallow specific parameters or employ URL fragments instead of parameters. Alternatively, use `rel=\"canonical\"` or `rel=\"nofollow\"` to reduce crawling of these pages. If faceted URLs are needed, utilize `&` for parameters, maintain consistent filter order, and return `404` for no-result combinations.\n"],null,["# Managing crawling of faceted navigation URLs | Google Search Central\n\nManaging crawling of faceted navigation URLs\n============================================\n\n\nFaceted navigation is a common feature of websites that allows its visitors to change how items\n(for example, products, articles, or events) are displayed on a page. It's a popular and useful\nfeature, however its most common implementation, which is based on URL parameters, can generate\ninfinite URL spaces which harms the website in a couple ways:\n\n- **Overcrawling**: Because the URLs created for the faceted navigation seem to be novel and crawlers can't determine whether the URLs are going to be useful without crawling first, the crawlers will typically access a very large number of faceted navigation URLs before the crawlers' processes determine the URLs are in fact useless.\n- **Slower discovery crawls**: Stemming from the previous point, if crawling is spent on useless URLs, the crawlers have less time to spend on new, useful URLs.\n\n\nA typical faceted navigation URL may contain various parameters in the query string related to the\nproperties of items they filter for. For example: \n\n```\nhttps://example.com/items.shtm?products=fish&color=radioactive_green&size=tiny\n```\n\n\nChanging any of the URL parameters `products`, `color`, and\n`size` would show a different set of items on the underlying page. This often means a\nvery large number of possible combinations of filters, which translates to a very large number of\npossible URLs. To save your resources, we recommend dealing with these URLs one of the following\nways:\n\n- If you don't need the faceted navigation URLs potentially indexed, prevent crawling of these URLs.\n- If you need the faceted navigation URLs potentially indexed, ensure that the URLs follow our best practices outlined in the following section. Keep in mind that crawling faceted URLs tends to cost sites large amounts of computing resources due to the sheer amount of URLs and operations needed to render those pages.\n\nPrevent crawling of faceted navigation URLs\n-------------------------------------------\n\n\nIf you want to save server resources and you don't need your faceted navigation URLs to show up in\nGoogle Search, you can prevent crawling of these URLs with one of the following ways.\n\n- **Use [robots.txt](/search/docs/crawling-indexing/robots/intro) to disallow crawling of faceted navigation URLs.** Oftentimes there's no good reason to allow crawling of filtered items, as it consumes server resources for no or negligible benefit; instead, allow crawling of just the individual items' pages along with a dedicated listing page that shows all products without filters applied. \n\n ```\n user-agent: Googlebot\n disallow: /*?*products=\n disallow: /*?*color=\n disallow: /*?*size=\n allow: /*?products=all$\n ```\n- **Use URL fragments to specify filters.** [Google Search generally doesn't support URL fragments in crawling and indexing](/search/docs/crawling-indexing/url-structure#fragments). If your filtering mechanism is based on URL fragments, it will have no impact on crawling (positive or negative). For example, instead of URL parameters, use URL fragments: \n\n ```\n https://example.com/items.shtm#products=fish&color=radioactive_green&size=tiny\n ```\n\n\nOther ways to signal a preference of which faceted navigation URLs (not) to crawl is using\n`rel=\"canonical\"` `link` element and the `rel=\"nofollow\"` anchor\nattribute. However, these methods are generally less effective in the long term than the\npreviously mentioned methods.\n\n- **Using [`rel=\"canonical\"`](/search/docs/crawling-indexing/consolidate-duplicate-urls#rel-canonical-link-method)\n to specify which URL is the canonical version of a faceted navigation URL** may, over time, decrease the crawl volume of non-canonical versions of those URLs. For example, if you have 3 filtered page types, consider pointing the `rel=\"canonical\"` to the unfiltered version: `https://example.com/items.shtm?products=fish&color=radioactive_green&size=tiny` specifies `\u003clink rel=\"canonical\" href=\"https://example.com/items.shtm?products=fish\" \u003e`.\n- **Using\n [`rel=\"nofollow\"`](/search/docs/crawling-indexing/qualify-outbound-links#nofollow)\n attributes on anchors pointing to filtered results pages** may be beneficial, however keep in mind that every anchor pointing to a specific URL must have the `rel=\"nofollow\"` attribute in order for it to be effective.\n\nEnsure the faceted navigation URLs are optimal for the web\n----------------------------------------------------------\n\n\nIf you need your faceted navigation URLs to be potentially crawled and indexed, ensure you're\nfollowing these best practices to minimize the negative effects of crawling the large number of\npotential URLs on your site:\n| Keep in mind that having these URLs crawled means an increased resource usage on your server and, potentially, slower discovery of new URLs on your site.\n\n1. **Use the industry standard URL parameter separator '`&`'.** Characters like comma (`,`), semicolon (`;`), and brackets (`[` and `]`) are hard for crawlers to detect as parameter separators (because most often they're not separators).\n2. If you're encoding filters in the URL path, such as `/products/`**fish** `/`**green** `/`**tiny**, ensure that the logical order of the filters always stays the same and that no duplicate filters can exist.\n3. **Return an HTTP `404` status code when a filter combination doesn't return\n results.** If there are no green fish in the site's inventory, users as well as crawlers should receive a \"not found\" error with the proper HTTP status code (`404`). This should also be the case if the URL contains duplicate filters or otherwise nonsensical filter combinations, and nonexistent pagination URLs. Similarly, if a filter combination has no results, don't redirect to a common \"not found\" error page. Instead, serve a \"not found\" error with the `404` HTTP status code under the URL where it was encountered. If [you have a single-page app](/search/docs/crawling-indexing/javascript/javascript-seo-basics#avoid-soft-404s) this might not be possible. Follow the best practices for single page apps."]]