Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Coppa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Come monitorare facilmente le pagine 404 e reindirizzarle in WordPress

Nota editoriale: guadagniamo una commissione dai link dei partner su WPBeginner. Le commissioni non influenzano le opinioni o le valutazioni dei nostri redattori. Per saperne di più su Processo editoriale.

State cercando un modo semplice per trovare le pagine di errore 404 sul vostro sito WordPress e reindirizzarle?

Gli errori 404 si verificano quando gli utenti cercano di raggiungere una pagina del vostro sito web che non esiste più. Questi errori creano un’esperienza negativa per l’utente, che può portare a un calo del posizionamento sui motori di ricerca e a una riduzione delle vendite del commercio elettronico.

In questo articolo vi mostreremo come tracciare facilmente le pagine 404 e reindirizzarle in WordPress.

How to Easily Track 404 Pages and Redirect Them in WordPress

Che cos’è un errore 404?

Un errore 404 è un codice di stato HTTP che indica che il server non è riuscito a raggiungere la pagina web che si sta cercando di visitare.

Ciò significa che se si inserisce l’URL di una pagina web che non esiste, verrà visualizzato l’errore “404 Page Not Found”.

404 Page Example

Le ragioni per cui si verifica l’errore 404 sono molteplici. Potrebbe essere perché il visitatore ha commesso un errore nell’inserimento dell’URL, la pagina è stata cancellata dal sito web o il nome del dominio non esiste più.

Un’altra causa dell’errore 404 si verifica quando una pagina è stata spostata su un altro URL ma non è stata reindirizzata correttamente, con il risultato di un link interrotto.

Infine, a volte anche i malfunzionamenti del server possono causare errori 404 su un sito web WordPress.

Perché tracciare e reindirizzare le pagine 404 in WordPress?

Ora che conoscete le diverse cause degli errori 404, vediamo perché è estremamente importante per i proprietari di siti web tenere traccia degli errori 404 e risolverli.

Gli errori 404 sono negativi per l’esperienza utente del vostro sito. Se gli utenti non riescono a trovare la pagina che stanno cercando, è probabile che abbandonino il vostro sito per rivolgersi ai vostri concorrenti.

Ciò significa che perderete dei potenziali clienti e un’opportunità di convertire i vostri visitatori in abbonati.

Inoltre, gli errori 404 hanno un impatto negativo sul posizionamento SEO di WordPress. Gli algoritmi di posizionamento dei motori di ricerca spesso penalizzano i siti web quando si imbattono in link non funzionanti.

Per non parlare del fatto che queste pagine interrotte vi faranno perdere backlink preziosi per il vostro sito web, con conseguente riduzione dell’autorità del dominio e un calo significativo del posizionamento delle parole chiave su Google.

Detto questo, diamo un’occhiata a come è possibile rintracciare facilmente le pagine 404 e reindirizzarle in WordPress. Tratteremo due metodi diversi, quindi non esitate a cliccare sui link sottostanti per passare al metodo che preferite:

Video tutorial

Subscribe to WPBeginner

Se preferite le istruzioni scritte, continuate a leggere.

Metodo 1: Tracciare e reindirizzare le pagine 404 con AIOSEO (consigliato)

Il modo più semplice per monitorare e correggere le pagine 404 sul vostro sito web WordPress è utilizzare il plugin All in One SEO per WordPress, noto anche come AIOSEO. È il miglior plugin SEO per WordPress, utilizzato da oltre 3 milioni di professionisti.

AIOSEO consente di trovare facilmente le pagine con link non funzionanti e di risolverle con pochi clic grazie al suo potente Redirection Manager.

La cosa migliore di AIOSEO è che vi aiuta a impostare reindirizzamenti 301 più rapidi, il che vi aiuta a migliorare il posizionamento nei motori di ricerca.

Per questo tutorial, utilizzeremo la versione AIOSEO Pro, che include il potente addon Redirection Manager. Esiste una versione gratuita di AIOSEO, ma non include il monitoraggio dei 404 o il Redirection Manager.

Per prima cosa, è necessario installare e attivare il plugin AIOSEO Pro. Per maggiori dettagli, consultate la nostra guida passo-passo su come installare un plugin di WordPress.

Attivazione dei reindirizzamenti e abilitazione dei log degli errori 404 in AIOSEO

Una volta che il plugin è attivo, si può andare in All in One SEO ” Reindirizzamenti e fare clic sul pulsante ‘Attiva reindirizzamenti’.

Activating Redirects in All in One SEO

Successivamente, è necessario visitare la scheda “Impostazioni” alla voce Reindirizzamenti e configurare il plugin per mantenere i log 404 e tenere traccia delle pagine con link non funzionanti.

È sufficiente scorrere verso il basso fino alla sezione “Registri” e assicurarsi che l’opzione “Registri 404” sia attivata. Quindi, selezionare il periodo di tempo in cui registrare i registri 404 utilizzando il menu a discesa. Si consiglia di non superare un mese per ottenere prestazioni ottimali del server.

Enable 404 logs

Una volta terminato, fare clic sul pulsante “Salva modifiche”.

Nella sezione Reindirizzamenti di AIOSEO è ora presente la scheda “Registri 404”. Quando si attivano i log 404 per la prima volta, questa pagina non contiene dati perché inizia a monitorare le pagine 404 solo dopo aver attivato l’impostazione.

Nel tempo, verrà visualizzato un elenco di tutti gli URL che hanno un errore 404. Si vedrà quante volte qualcuno ha tentato di visitare il link nella colonna “Hits” e la data dell’ultima visita nella colonna “Last Accessed”.

Una volta identificate le pagine con link non funzionanti, è possibile reindirizzarle semplicemente facendo clic sul pulsante “Aggiungi reindirizzamento”. L’URL deve essere reindirizzato a una pagina pertinente del vostro sito web.

Click 404 logs menu option

Quando si fa clic sul pulsante, viene visualizzata l’opzione per inserire un URL di destinazione e selezionare il tipo di reindirizzamento dal menu a discesa.

Ad esempio, è possibile spostare una pagina in modo permanente selezionando l’opzione “301 Moved Permanently”.

Add redirect

Quindi, fare clic sul pulsante “Aggiungi reindirizzamento” e il link interrotto verrà automaticamente reindirizzato al nuovo URL di destinazione.

Cancellazione dei log degli errori 404 in AIOSEO

Con il tempo, le dimensioni del file di log possono crescere e occupare molto spazio su disco. La mancanza di spazio su disco dell’hosting WordPress può causare errori. Per essere sicuri di non incorrere in questo problema, è buona norma eliminare e cancellare i registri degli errori 404.

Con AIOSEO è possibile eliminare facilmente ogni singolo errore 404 dai log facendo clic sull’icona del cestino.

Delete 404 error log entry from AIOSEO

È inoltre possibile eliminare in blocco i registri 404 andando su All in One SEO ” Strumenti e facendo clic sulla scheda “Strumenti database”.

A questo punto, basta scorrere fino alla sezione “Registri” e fare clic sul pulsante “Cancella 404 registri”.

Clear 404 logs from database tools

Monitoraggio Permalink in AIOSEO

Oltre a tracciare gli errori 404, AIOSEO Redirect Manager offre anche il monitoraggio dei permalink. Ciò significa che se cancellate una pagina del vostro sito o cambiate l’URL di un post del blog, AIOSEO vi avviserà automaticamente per impostare un reindirizzamento.

In alcuni casi, AIOSEO può anche impostare i reindirizzamenti 301 corretti per voi senza alcuno sforzo.

Suggerimento bonus: Impostare reindirizzamenti 301 più veloci in WordPress con AIOSEO

AIOSEO consente inoltre di impostare reindirizzamenti più rapidi accedendo alla scheda “Impostazioni” e scegliendo il metodo di reindirizzamento “Server Web”.

AIOSEO Server Level Redirects

Ciò consente di ottenere miglioramenti significativi della velocità rispetto al metodo di reindirizzamento predefinito di WordPress/PHP.

Metodo 2: Tracciare e reindirizzare le pagine 404 utilizzando il plugin Redirection

Il metodo successivo per tracciare e reindirizzare gli errori 404 consiste nell’utilizzare il plugin gratuito Redirection per WordPress. Si tratta di un plugin avanzato, quindi alcuni principianti potrebbero trovarlo più difficile da usare.

Per prima cosa, è necessario installare e attivare il plugin. Per maggiori dettagli, consultate la nostra guida passo-passo su come installare un plugin di WordPress.

Dopo l’attivazione, andare su Strumenti ” Reindirizzamento, quindi scorrere verso il basso e fare clic sul pulsante “Avvia impostazione” per impostare i reindirizzamenti.

Start setup of Redirection plugin

Dopodiché, il plugin chiederà se si desidera monitorare le modifiche dei permalink in WordPress e mantenere i registri dei reindirizzamenti e degli errori 404.

È sufficiente selezionare la casella di controllo per queste opzioni e fare clic sul pulsante “Continua configurazione”.

Basic setup Redirection plugin

Il plugin ora verificherà lo stato dell’API REST.

Quando il risultato dello stato è “Buono”, si può fare clic sul pulsante “Termina configurazione”.

Rest API test in Redirection

Successivamente, il plugin imposterà il reindirizzamento. Questa operazione richiederà alcuni secondi e, al termine, sarà necessario fare clic sul pulsante “Continua” e poi sul pulsante “Pronto per iniziare!

Ora si può iniziare a reindirizzare le pagine 404.

È sufficiente inserire l’URL della pagina che si desidera reindirizzare nella colonna “URL di origine”.

Quindi, dal menu a tendina “Query Parameter”, selezionare se si desidera che i parametri della query corrispondano esattamente, se si desidera ignorarli o se si desidera passarli nell’URL di destinazione.

A questo punto, è necessario inserire l’URL di destinazione a cui la pagina 404 sarà reindirizzata, mantenere l’opzione Gruppo come ‘Reindirizzamento’ e fare clic sul pulsante ‘Aggiungi reindirizzamento’.

Add new redirection

Se si desiderano altre opzioni per impostare il reindirizzamento, è sufficiente fare clic sull’icona dell’ingranaggio accanto al pulsante “Aggiungi reindirizzamento”.

Si può iniziare aggiungendo il vecchio URL che mostra 404 nel campo “URL sorgente”, selezionando il parametro Query come prima e aggiungendo un titolo per descrivere lo scopo di questo reindirizzamento.

Quindi, selezionare l’opzione “Corrispondenza” dal menu a tendina. Verranno visualizzate diverse opzioni, tra cui solo l’URL, l’URL e il referrer, l’URL e l’agente utente e l’URL e lo stato di accesso.

More options for add new redirection

Nella maggior parte dei casi, si desidera utilizzare l’impostazione “URL e referente”. Infatti, se si verificano diverse richieste di 404 per una pagina specifica, è probabile che gli utenti abbiano cliccato sullo stesso link all’URL sbagliato, anziché digitare tutti lo stesso indirizzo web errato.

Ora, ogni volta che qualcuno fa clic sull’URL non funzionante, viene automaticamente reindirizzato alla nuova posizione.

Assicurarsi poi che l’azione sia “Reindirizzamento all’URL”. Le altre opzioni sono complesse e richiedono conoscenze tecniche avanzate.

Per il tipo di reindirizzamento, è necessario selezionare un’opzione dal menu a tendina del codice HTTP. Per un reindirizzamento permanente, questo dovrebbe essere “301 – Spostato in modo permanente”.

Infine, inserire l’URL di destinazione nel campo “Matched Target”. Dopo aver inserito queste informazioni, basta premere il pulsante “Aggiungi reindirizzamento”.

È possibile accedere al nuovo URL per verificare che il reindirizzamento funzioni correttamente.

Il plugin ha anche la possibilità di tenere traccia dei registri degli errori 404. È sufficiente fare clic sulla scheda “404” in alto e il plugin mostrerà gli errori 404 più recenti che si sono verificati sul vostro sito da quando avete installato il plugin.

404 Logs in Redirection plugin

Nota: se si è appena attivato il plugin Redirection, la pagina di log 404 sarà vuota. Il registro degli errori 404 inizia solo dopo l’attivazione del plugin.

Bonus: progettare una pagina 404 personalizzata con SeedProd

Impostando i reindirizzamenti, i visitatori non dovrebbero imbattersi in molte pagine di errore 404 sul vostro sito WordPress. Tuttavia, se dovessero trovarsi su una pagina 404, è una buona idea avere un design personalizzato che aiuti gli utenti.

L’inclusione del vostro marchio personalizzato può far apparire la vostra pagina 404 più rispettabile. Aggiungendo un modulo di contatto, gli utenti possono comunicarvi l’indirizzo inserito che ha generato l’errore 404. Potete anche includere dei link ai vostri post o prodotti più popolari, in modo che i visitatori siano invogliati a rimanere sul vostro sito.

Per fortuna, è facile progettare una pagina 404 personalizzata con SeedProd. È il miglior costruttore di pagine di atterraggio per WordPress e dispone di numerosi modelli personalizzabili per le pagine 404.

Building a custom 404 page for your WordPress website

Per saperne di più, consultate la nostra guida completa su come migliorare il modello della pagina 404 in WordPress.

Guide esperte sulla gestione degli errori 404 in WordPress

Ora che sapete come rintracciare e reindirizzare gli errori 404, potreste voler consultare altre guide relative alla gestione degli errori 404 in WordPress.

Speriamo che questo articolo vi abbia aiutato a capire come monitorare le pagine 404 e reindirizzarle in WordPress. Potreste anche voler consultare la nostra guida su come aumentare il traffico del vostro blog in modo semplice o la nostra selezione dei migliori esempi di pagine di errore 404 per ispirare il design del vostro sito web.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

46 commentiLascia una risposta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Mrteesurez says

    Instead of redirection the 404 error page, why can one rebuild or customize it and make it a landing page that can even leads to conversion.
    Thanks for the article.

    • WPBeginner Support says

      You certainly can and it would depend on the use case for if a 404 page or a redirect would be better :)

      Admin

  3. Moinuddin Waheed says

    Very often we encounter nice and intuitive 404 error pages with some navigation links to the other pages of the website.
    it is good idea to completely redirect them without them having to navigate themselves to other pages.
    Having said that, redirecting from 404 error pages, does it completely hide the error from users and just redirect behind the wall to some other pages of encountered 404 error or it shows 404 error and then redirects to other pages?

    • WPBeginner Support says

      It would depend on the specific content that would originally cause a 404, if you have a good replacement article then you can redirect to the new article.

      Redirecting would mean that your new page is shown instead of a 404 error.

      Admin

  4. Jiří Vaněk says

    I would like to ask if it’s really a good strategy to perform redirects for 404 pages. Personally, I’ve taken the approach of creating a really nice 404 page where I apologize for the mishap and offer the reader other website content. This means showing them the latest 10 articles that might interest them. I’ve also designed the page to reduce frustration and give the reader a bit of amusement, even if they didn’t find what they were looking for. Why I’m asking: If I redirect to another page, won’t the user be confused that not only did they not find what they were looking for, but also they won’t see the information that the page doesn’t exist? Thus, preventing them from futilely searching for it and instead giving them a direct message that unfortunately, that content no longer exists?

    • WPBeginner Support says

      It heavily depends on your content, personal preference, and site for which would be best. This guide helps those who want to set up this redirect.

      Admin

  5. Ralph says

    It is very important to take care of our 404 error as it may looks very unprofessional for our viewers. Once again you guys prove All in One SEO is great tool that can take care of many things that matter.

  6. sarah hawkins says

    We moved host and build and our new build pages load fine but the crawlers still locate pages from our old host that end in .html and these bring up error 404 pages but are not in my sitemap or build.
    Will these disappear over time with new search engine crawls or do i have to do anything? Any help would be very much appreciated.

    • WPBeginner Support says

      If they are important pages then it would normally be best to redirect them to the correct URL.

      Admin

  7. Nikolinayoga says

    Hi, can you erase the 404 URL that the crawl found (without having them among the actual pages in the dashboard)

    I want to erase them but don´t know how to “locate them” lol
    Or in that case the only option is to redirect them to the homepage?

    Thank you

    • WPBeginner Support says

      It would depend on the specifics of what you mean. If the page does not exist then redirecting it to the home page would let search engines know the page does not exist

      Admin

  8. Raymond Cyprian says

    Good I stumbled upon this. Had been looking for a way to redirect error 404.pages. I think this did a good job for me. Pls can I uninstall the plugin once I have completed all redirects as I already have slot of plugins and they are beginning to slow down my site.

  9. dimip says

    Nice… I have recently moved from http to https and i see in google search results both http and https links both works but i want for all non https link that the user is redirected to https. Does the above tool is what i need?
    Does google sees http to https as different website shall i use change of address tool or is enough that i have registered also the https ?
    Do you have a quide or plan to make one with easy steps http to https ?

      • Dimip says

        Thanks a lot :) I forgot to add that it was a migration from weebly to wordpress. The site is a perfect copy, all structure kept the same but at weebly was example.com/sample.html where at wordpress example.com/sample.
        I have given the new sitemap to Google and deleted the order without redirect that happened before a month plus now the https I have seen a major drop down in SEO in search results. Is there a way to recover from this? For example if I can find again the old sitemap from weebly? For the Google map section things are the same. Some advice please?

  10. Precious says

    Hello, thank you so much for this tutorial! It helped me redirect some of my 404 pages that result from my recent Blogger-WordPress move.
    However, I noticed I have A LOT of posts that need to be redirected to the right URL, judging from the number of tracked errors on the 404 tab. My question is is there a way to automate this? Some of these links are mobile links from my former blog with the m? added to them. The thing is it may take so long to do all those redirects one after the other. I am also concerned about losing the confidence of those who visit my site.
    How do I fix this? Is there a way to automatically redirect all the 404 pages to the right posts? Please help me.

  11. David Pascal says

    I have just installed it and did some redirection. I hope it works the way I expect. Anyway, its a nice plugin. Thanks for the helpful post about it.

  12. Will Franco aka Flywheel says

    Watch out with the Redirection plugin though!

    Redirection Plugin Trialing Slash Issue

    a. Issue with and without trialing /

    b. Currently, I have to setup two redirects per URL

    ​If you don’t the URL that’s not setup in redirection will 404.​

    the bug is easy to miss! and the plugin documentation doesn’t specify that you actually need to create two redirects per one.

    if you visit the target page by clicking the source first it will work

    and then if you visit the non-trailing slash it will work

    you have the visit the non-trailing slash first to get the 404 (i.e. like a visitor of your site)

    and it seems nobody is talking about this either!!!

    • Courtney says

      FYI… this is not a bug. This is what regex is for – you can check the “regex” box to use that option. Regular expressions allow you to create 1 redirection and then tell it to redirect with or without the trailing slash. Regex is how ‘normal’ htaccess file rules are created, which is what this plugin does via WP instead (unless you have it set up to use Apache or nginx). More about regex here – . GL.

  13. WPBeginner Staff says

    Redirects not only help search engines but will also help users coming from other sources. If you are confident that you will not loose any visitors then you can deactivate the plugin.

  14. AL Spaulding says

    Great little plugin. Just handled a big batch of redirects on a site with it. I have a quick question though.

    While I am aware that the plugin must stay activated for the redirects to work, how long after the big “G” (google) has indexed the correct page(s) and ranked them accordingly wuld it be safe to remove the plugin?

    For example: if howdy/doody/funny is redirected to howdy/doody/funny/humor, and Google is now ranking and indexing howdy/doody/funny/humor, after you alert google of the repair in Webmaster Tools; is it not safe to remove the plugin then? Or is this permanent for the life of the site?

    Excuse the lengthy question. Thanks in advance. :)

  15. Silas Jura says

    Does this work if I am building a new website in WordPress (on a new domain) and replacing my site that is currently with Weebly (on our old domain)? We decided it would be easier to use a new domain (plus it’s more SEO friendly, I think) to build the new site on WordPress so the redirect would need to come from our old domain (TitanMgmtGroup.com) and redirect to the appropriate pages on our new domain (TitanPropertyManagement.co). What do you think, should I redirect the old domain or should I switch the WordPress site to the old domain once I’m done building it? Thanks for any help you can provide.

  16. Nur Ahmad Furlong says

    I really love the redirection plugin, it has however been misbehaving alot lately, I think the developers have not been keeping it up to date. It still works but can sometimes get you stuck with redirects you can’t remove even after deleting them.

    I’m sticl with a tricky problem. I converted atons of auto generated categories to tags and now have a ton of 404’s I need to somehow redirect automatically.

    Any ideas how I can bulk redirect 404 category links to the tag equavalent?

  17. Trent says

    I’ll give this plugin a try, sounds like it’ll work great. My only concern is that it will slow the site down. This leads me to a question: if I use the plugin now and fix all my 404s through 301 redirects with this app, then delete the app when I’m done redirecting all the pages, will the redirects stay, or will they go away with the app. In other words, do I need to keep the plugin installed and activated to keep the 301 redirects active? Thanks!

  18. Frank says

    And what does Google like this? Or will it give you a lowere rate?
    Google cleans up the 404 results automatically right?

  19. Brandon N. says

    What are “match”, “action”, and “regular expression” used for? Was hoping that would be covered in the article.

  20. javierojuel says

    Is it better to manage the 404 error pages in the htaccess file or with this plugin? Is there a performance issue using one of these two systems?

    • wpbeginner says

      @javierojuel This plugin is a must have for pretty much every blog. It is very well optimized. The point is that you can’t track 404 pages as well as this plugin does. Also by doing the hard code way, you can screw things up if you don’t know what you are doing. Redirection protects you at least to some extent.

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.