Come ripristinare il file Hosts predefinito

()

Come ripristinare il file Hosts predefinito

Cos’è il file Hosts

Il file Hosts viene utilizzato dal sistema operativo per eseguire il mapping di nomi di host human-friendly a indirizzi IP (Internet Protocol) numerici che identificano e individuano un host in una rete IP. Il file host è una delle diverse risorse di sistema che soddisfano i nodi di rete in una rete di computer ed è una parte comune dell’implementazione IP del sistema operativo.

Il file Hosts contiene righe di testo formate da un indirizzo IP nel primo campo di testo seguite da uno o più nomi host. Ogni campo è separato da uno spazio bianco (per ragioni storiche spesso si preferiscono le tabulazioni, ma anche gli spazi sono utilizzati). Possono essere incluse righe di commenti, indicate da un carattere hash (#) all’inizio delle suddette righe. Le righe completamente vuote nel file vengono ignorate.

Se il file Hosts viene modificato per impostazione predefinita, il ripristino può aiutare a risolvere alcuni problemi di connettività.

Risoluzione

Per ripristinare il file Hosts predefinito attenersi alla procedura corrispondente al sistema operativo in uso:


Windows 10

Per ripristinare il file Hosts predefinito, attenersi alla seguente procedura:

  1. Aprire il Blocco note. A tale scopo, cercare “Blocco note” utilizzando Cortanae quindi fare clic sull’icona Blocco note.

  2. Copiare il testo seguente e incollare il testo nel file:

  3. # Copyright (c) 1993-2006 Microsoft Corp.

  4. #

  5. # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

  6. #

  7. # This file contains the mappings of IP addresses to host names. Each

  8. # entry should be kept on an individual line. The IP address should

  9. # be placed in the first column followed by the corresponding host name.

  • # The IP address and the host name should be separated by at least one

  • # space.

  • #

  • # Additionally, comments (such as these) may be inserted on individual

  • # lines or following the machine name denoted by a ‘#’ symbol.

  • #

  • # For example:

  • #

  • # 54.94.97 rhino.acme.com          # source server

  • # 25.63.10 x.acme.com              # x client host

  • # localhost name resolution is handle within DNS itself.

  • # 0.0.1 localhost

#       ::1             localhost

  1. Nel menu Fileselezionare Salva con nome, digitare “hosts”nella casella Nome file (come mostrato nella seguente immagine), quindi salvare il file sul desktop.

  1. Chiudere il Blocco note.

  2. Cercare %WinDir%\System32\Drivers\Etc utilizzando Cortanae quindi selezionare l’icona della Cartella File.

  3. Selezionare e tenere premuto o fare clic con il tasto destro del mouse sul file Hosts, selezionare Rinomina, quindi rinominare il file come “Hosts.old”.

  4. Copiare o spostare il file Hosts creato al passaggio 3 dal desktop alla cartella %WinDir%\System32\Drivers\Etc. Se viene richiesto di immettere una password di amministratore, selezionare Continua.

Windows 8.1

Per ripristinare il file Hosts predefinito, attenersi alla seguente procedura:

  1. Aprire il Blocco note. A questo scopo, scorrere rapidamente dal margine destro dello schermo, quindi toccare Cerca, digitare Blocco note e toccare l’icona del Blocco note. Oppure, se si utilizza un mouse, puntarlo sull’angolo superiore destro dello schermo, spostare il puntatore del mouse in basso, fare clic su Cerca, digitare Blocco note, quindi fare clic su Blocco note.
  2. Copiare il testo seguente e incollare il testo nel file:
    # Copyright (c) 1993-2006 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    # localhost name resolution is handle within DNS itself.
    #       127.0.0.1       localhost
    #       ::1             localhost
  3. Nel menu File selezionare Salva con nome, digitare “hosts” nella casella Nome file, come mostrato nella seguente immagine, quindi salvare il file sul desktop.

    On the File menu, select Save as, type
  4. Chiudere il Blocco note.
  5. Aprire la cartella %WinDir%\System32\Drivers\Etc. A tal fine, attenersi alla procedura seguente:
    1. Scorrere rapidamente dal margine destro dello schermo, toccare Cerca, digitare esegui e quindi toccare l’icona Esegui. Oppure, se si utilizza un mouse, puntarlo sull’angolo superiore destro dello schermo, spostare il puntatore del mouse in basso, selezionare Cerca, digitare esegui, quindi selezionare l’icona Esegui.
    2. Digitare %WinDir%\System32\Drivers\Etc nella casella Apri e selezionare OK.
  6. Selezionare il file Hosts, selezionare Rinominaquindi rinominare il file in “Hosts.old”.
  7. Copiare o spostare il file Hosts creato al passaggio 3 nella cartella %WinDir%\System32\Drivers\Etc. Se viene richiesto di immettere una password di amministratore, toccare o fare clic su Continua.

Windows 8.1

Per ripristinare il file Hosts predefinito, attenersi alla seguente procedura:

  1. Aprire il Blocco note. A questo scopo, scorrere rapidamente dal margine destro dello schermo, quindi toccare Cerca, digitare Blocco notee toccare l’icona del Blocco note. Oppure, se si utilizza un mouse, puntarlo sull’angolo superiore destro dello schermo, spostare il puntatore del mouse in basso, fare clic su Cerca, digitare Blocco note, quindi fare clic su Blocco note.
  2. Copiare il testo seguente e incollare il testo nel file:
  3. # Copyright (c) 1993-2006 Microsoft Corp.
  4. #
  5. # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
  6. #
  7. # This file contains the mappings of IP addresses to host names. Each
  8. # entry should be kept on an individual line. The IP address should
  9. # be placed in the first column followed by the corresponding host name.
  • # The IP address and the host name should be separated by at least one
  • # space.
  • #
  • # Additionally, comments (such as these) may be inserted on individual
  • # lines or following the machine name denoted by a ‘#’ symbol.
  • #
  • # For example:
  • #
  • # 54.94.97 rhino.acme.com          # source server
  • # 25.63.10 x.acme.com              # x client host
  • # localhost name resolution is handle within DNS itself.
  • # 0.0.1 localhost

#       ::1             localhost

  1. Nel menu Fileselezionare Salva con nome, digitare “hosts”nella casella Nome file, come mostrato nella seguente immagine, quindi salvare il file sul desktop.
  2. Chiudere il Blocco note.
  3. Aprire la cartella %WinDir%\System32\Drivers\Etc. A tal fine, attenersi alla procedura seguente:
    1. Scorrere rapidamente dal margine destro dello schermo, toccare Cerca, digitare eseguie quindi toccare l’icona Esegui. Oppure, se si utilizza un mouse, puntarlo sull’angolo superiore destro dello schermo, spostare il puntatore del mouse in basso, selezionare Cerca, digitare esegui, quindi selezionare l’icona Esegui.
    2. Digitare %WinDir%\System32\Drivers\Etcnella casella Apri e selezionare OK.
  4. Selezionare il file Hosts, selezionare Rinomina, quindi rinominare il file in “Hosts.old”.
  5. Copiare o spostare il file Hosts creato al passaggio 3 nella cartella %WinDir%\System32\Drivers\Etc. Se viene richiesto di immettere una password di amministratore, toccare o fare clic su Continua.

Windows 7 e versioni precedenti di Windows

Per ripristinare manualmente il file Hosts predefinito, attenersi alla seguente procedura:

  1. Fare clic su Start, fare clic su Esegui, digitare Notepad, quindi fare clic su OK.
  2. Copiare il seguente testo nel file:Per Windows 7
    # Copyright (c) 1993-2006 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    
    # localhost name resolution is handle within DNS itself.
    #       127.0.0.1       localhost
    #       ::1             localhost

    Per Windows XP o per Windows Server 2008

    # Copyright (c) 1993-2006 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    
    127.0.0.1       localhost
    ::1             localhost

    Per Windows XP o per Windows Server 2003

    # Copyright (c) 1993-1999 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    
    127.0.0.1       localhost
  3. Nel menu File selezionare Salva con nome, digitare “hosts” nella casella Nome file, quindi salvare il file sul desktop.
    On the File menu, select Save as, type
  4. Selezionare Start > Esegui, digitare %WinDir%\System32\Drivers\Etc, quindi selezionare OK.
  5. Selezionare il file Hosts e rinominarlo in “Hosts.old”.
  6. Copiare o spostare il file Hosts creato al passaggio 3 nella cartella %WinDir%\System32\Drivers\Etc. Se viene richiesto di immettere una password di amministratore, selezionare Continua.

Per Windows XP o per Windows Server 2008

# Copyright (c) 1993-2006 Microsoft Corp.

#

# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

#

# This file contains the mappings of IP addresses to host names. Each

# entry should be kept on an individual line. The IP address should

# be placed in the first column followed by the corresponding host name.

# The IP address and the host name should be separated by at least one

# space.

#

# Additionally, comments (such as these) may be inserted on individual

# lines or following the machine name denoted by a ‘#’ symbol.

#

# For example:

#

#      102.54.94.97     rhino.acme.com          # source server

#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost

::1             localhost

Per Windows XP o per Windows Server 2003

# Copyright (c) 1993-1999 Microsoft Corp.

#

# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

#

# This file contains the mappings of IP addresses to host names. Each

# entry should be kept on an individual line. The IP address should

# be placed in the first column followed by the corresponding host name.

# The IP address and the host name should be separated by at least one

# space.

#

# Additionally, comments (such as these) may be inserted on individual

# lines or following the machine name denoted by a ‘#’ symbol.

#

# For example:

#

#      102.54.94.97     rhino.acme.com          # source server

#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost

  1. Nel menu Fileselezionare Salva con nome, digitare “hosts”nella casella Nome file, quindi salvare il file sul desktop.

  2. Selezionare Start >Esegui, digitare %WinDir%\System32\Drivers\Etc, quindi selezionare OK.

  3. Selezionare il file Hosts e rinominarlo in “Hosts.old”.

  4. Copiare o spostare il file Hosts creato al passaggio 3 nella cartella %WinDir%\System32\Drivers\Etc. Se viene richiesto di immettere una password di amministratore, selezionare Continua

/ 5
Grazie per aver votato!

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?