文書番号: 972034 - 最終更新日: 2009年12月17日 - リビジョン: 2.1

hosts ファイルを既定にリセットして戻す方法

すべて展開する | すべて折りたたむ

問題の説明

この資料は、hosts ファイルを既定にリセットして戻すのに役立ちます。

このページで hosts ファイルを既定にリセットして戻すには、「Fix it で解決する」セクションに進んでください。自身で hosts ファイルを既定にリセットして戻すには、「自分で解決する」に進んでください。

Fix it で解決する

自動的に hosts ファイルを既定にリセットして戻すには、[この問題を解決する] ボタンまたはリンクをクリックします。[ファイルのダウンロード] ダイアログ ボックスで [実行] をクリックし、このウィザードの手順に従います。


この問題を解決する
Microsoft Fix it 50267


: このウィザードは英語版のみである場合がありますが、自動的な解決は英語版以外の Windows でも機能します。

: 問題のあるコンピューターとは別のコンピューターを操作している場合、自動的な解決ツールをフラッシュ ドライブまたは CD に保存することで、問題のあるコンピューターで実行することができます。

次に、「問題が解決されたかどうかの確認」セクションに進んでください。

自分で解決する

自分で hosts ファイルを既定にリセットして戻すには、以下の手順を実行します。
  1. [スタート] ボタンをクリックし、[ファイル名を指定して実行] をクリックします。「%systemroot% \system32\drivers\etc」と入力し、[OK] をクリックします。

    : 64 ビット版の Windows を使用している場合は、「%systemroot% \SysWOW64\drivers\etc」と入力します。
  2. hosts ファイルの名前を hosts.bak に変更します。
  3. 新しい既定の hosts ファイルを作成します。これを実行するには、以下の手順を実行します。
    1. %WinDir%\system32\drivers\etc フォルダーの空いている場所を右クリックし、[新規作成] をポイントし、[テキスト文書] をクリックします。「hosts」と入力して Enter キーを押します。
    2. [はい] をクリックして、ファイル名拡張子が txt にはならないようにします。
    3. メモ帳などのテキスト エディターで、新しく作成した hosts ファイルを開きます。
    4. このファイルに以下のテキストをコピーします。

      Windows XP または Windows Server 2003 の場合
      # Copyright ? 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
      Windows Vista または Windows Server 2008 の場合
      # Copyright ? 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
      Windows 7 の場合
      # Copyright ? 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
    5. ファイルを保存して閉じます。

問題が解決されたかどうかの確認

問題が解決されたかどうかを確認します。問題が解決された場合、この資料の作業は完了していることになります。問題が解決されていない場合は、サポートに問い合わせる (http://support.microsoft.com/contactus) ことができます。

この資料は以下の製品について記述したものです。
  • Windows 7 Enterprise
  • Windows 7 Home Basic
  • Windows 7 Home Premium
  • Windows 7 Professional
  • Windows 7 Starter
  • Windows 7 Ultimate
  • Windows Vista Enterprise 64-bit edition
  • Windows Vista Home Basic 64-bit edition
  • Windows Vista Home Premium 64-bit edition
  • Windows Vista Ultimate 64-bit edition
  • Windows Vista Business
  • Windows Vista Business 64-bit edition
  • Windows Vista Enterprise
  • Windows Vista Home Basic
  • Windows Vista Home Premium
  • Windows Vista Starter
  • Windows Vista Ultimate
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard x64 Edition
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Windows Server 2008 Datacenter
  • Windows Server 2008 Enterprise
  • Windows Server 2008 Standard
キーワード:?
kbexpertisebeginner kbsurveynew kbmsifixme kbfixme KB972034
"Microsoft Knowledge Baseに含まれている情報は、いかなる保証もない現状ベースで提供されるものです。Microsoft Corporation及びその関連会社は、市場性および特定の目的への適合性を含めて、明示的にも黙示的にも、一切の保証をいたしません。さらに、Microsoft Corporation及びその関連会社は、本文書に含まれている情報の使用及び使用結果につき、正確性、真実性等、いかなる表明・保証も行ないません。Microsoft Corporation、その関連会社及びこれらの権限ある代理人による口頭または書面による一切の情報提供またはアドバイスは、保証を意味するものではなく、かつ上記免責条項の範囲を狭めるものではありません。Microsoft Corporation、その関連会社 及びこれらの者の供給者は、直接的、間接的、偶発的、結果的損害、逸失利益、懲罰的損害、または特別損害を含む全ての損害に対して、状況のいかんを問わず一切責任を負いません。(Microsoft Corporation、その関連会社 またはこれらの者の供給者がかかる損害の発生可能性を了知している場合を含みます。) 結果的損害または偶発的損害に対する責任の免除または制限を認めていない地域においては、上記制限が適用されない場合があります。なお、本文書においては、文書の体裁上の都合により製品名の表記において商標登録表示、その他の商標表示を省略している場合がありますので、予めご了解ください。"
 

サポート技術情報の翻訳