logo
search
Outlook Login Problems

How to Fix Outlook Gmail Localhost Not Found Error

Bushra ParveenBushra Parveen Sep 29, 2026 868 views

Question details

The user is unable to add a Gmail account to Outlook due to a 'localhost not found' error during the Google authentication process.

Fix the Outlook Gmail Localhost Not Found Authentication Error
Product
Microsoft Outlook
Device & OS
Windows
Scenario
Adding a Gmail account to Microsoft Outlook using the standard setup wizard.
Observed behavior
Outlook displays a 'localhost not found' error message and fails to connect when attempting to authenticate the Gmail account using Google OAuth.
Before you start

Ensure your internet connection is stable and have your current Google account login details, including any two-factor authentication devices, ready before attempting to sign in again.

Solution 1Recommended

Clear Outdated Credentials and Re-add Account

Removing stale Outlook and Microsoft credentials forces the application to request a fresh authentication token from Google.

Windows Credential Manager stores saved login tokens for various applications. If an old or corrupted token is conflicting with your new sign-in attempt, Outlook's OAuth redirect may fail and produce the localhost error.

1
Open Windows Credential Manager

Click the Windows Start button, type 'Credential Manager' into the search bar, and press Enter to open the utility.

2
Remove Stale Credentials

Select 'Windows Credentials'. Scroll through the list to locate any entries related to 'MicrosoftOffice' or 'Outlook'. Click the downward arrow next to each relevant entry and select 'Remove'.

3
Re-add the Gmail Account

Restart Outlook. Navigate to File > Add Account, enter your Gmail address, and follow the prompts to complete the modern Google OAuth sign-in process in the resulting pop-up window.

Clear Outdated Credentials and Re-add Account
Authentication Restored: By clearing old credentials, Outlook will successfully launch the new Google OAuth browser prompt without defaulting to broken cached data.
Free Microsoft Office alternative

Try WPS Office as a Lightweight, Hassle-Free Alternative

If you frequently encounter persistent errors with Microsoft Office applications, consider switching to WPS Office. It provides a free, lightweight, and user-friendly alternative with excellent compatibility for all your document, spreadsheet, and presentation needs.

  1. 1. Visit the Official Website: Open your browser and navigate to the official WPS Office website at wps.com.
  2. 2. Download the Installer: Click the 'Free Download' button on the homepage to get the latest version for your operating system.
  3. 3. Install and Run: Open the downloaded file, follow the quick installation prompts, and start managing your office documents instantly.
Fully compatible with Microsoft Word, Excel, and PowerPoint formatsLightweight design ensures fast installation and smooth performance without bogging down your PCFamiliar, tabbed user interface reduces the learning curve for easy migrationBuilt-in PDF editing tools and cloud storage integrations
microsoft office alternative - wps office

Frequently Asked Questions

Why does Outlook show 'localhost not found' during Gmail setup?

This error occurs when the Google OAuth 2.0 authentication process fails to correctly redirect back to Outlook after you enter your credentials. This can happen due to corrupted browser cache, outdated Windows credentials, or strict local firewall rules blocking the connection.

Do I need an app password for Gmail in Outlook?

For current versions of Microsoft Outlook, you no longer need a dedicated app password. Outlook natively supports Google's modern OAuth sign-in process, which triggers a standard secure browser login window instead of requiring a direct password connection.

What should I do if my firewall is blocking the Outlook login?

Temporarily pause your third-party antivirus software or Windows Defender Firewall during the account setup process. After you have successfully authenticated your Gmail account in Outlook, you can safely re-enable your security software.

How do I ensure IMAP is enabled for my Google account?

Sign in to your Gmail account via a web browser, click the gear icon in the top right to access Settings, select 'See all settings', navigate to the 'Forwarding and POP/IMAP' tab, and ensure 'Enable IMAP' is selected under the IMAP access section.