• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Security Certificate Warnings in Microsoft Outlook

Slipstick Systems

› Outlook › Security Certificate Warnings in Microsoft Outlook

Last reviewed on March 19, 2022     38 Comments

This hard to understand error means the security certificate your email server is using has expired or is invalid for other reasons.

I'm getting a security warning when I open Outlook. It says: 'The server you connected to is using a security certificate that cannot be verified. A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the file'

That message is saying that the certificate the mail server uses has likely expired.

If you are the administrator, you need to install an updated certificate; if you are an end-user, you need to speak to your admin. You can't hide the warning or turn it off, but in all likelihood, it's safe to OK it and connect to your mail server.

The message made perfect sense to me but not to the people who asked about it, so I asked a couple of family members who aren't into technology what they thought the message was trying to tell them and what they would do if it came up while they were on the computer. Their answer: it "hurt" to read it and they'd ask me to look at it. I guess that proves it's a poorly written, overly technical error message.

 

Target Principle name is incorrect

I have a SSL IMAP email account that I just setup in Outlook. Every time I run the program I get a popup: "Internet Security Warning" The server you are connected to is using a security certificate that cannot be verified. The target principle name is incorrect. View Certificate. The certificate is self signed so I always just click Yes to continue using the server/email account, but how do I get Outlook to remember?

Certificate warning

This warning indicates the server name does not match the name in your account settings, or in the case of Exchange server, that the address in the autodiscover file does not match the address the server is using. This is a common problem when the administrator uses self-published certificates.

The easiest fix is to change the server name, if your mail provider supports other server names.

For example, in the dialog in this screenshot, the server certificate was issued to pop.secureserver.net but I'm using mail.mydomain.com as the server name in my account settings. Since GoDaddy lets you use either server name, you can eliminate the error message if you use the secureserver.net server names.
Install the certificate
 
To get your mail server's IP address:

  1. Type cmd on the Start menu to open a Command Prompt.
  2. Type ping mail.yourservername.com to find your IP address and the hosts server name.
    check the ip using command prompt
  3. If the server name in the ping results matches the name on the certificate, use it as the mail server name in Outlook.
  4. If the name is different, ping the server name used in the certificate. If the IP address matches your mail server's IP address use it as the mail server name in Outlook.

If your host does not have a server name you can use to eliminate the error, John Roper-Lindsay uses these steps:
You can get around the "Target Principal Name is incorrect" by following the steps below:

  1. If you didn't ping your server for the IP address (or didn't make note of it), open a cmd prompt and ping your incoming mail server - e.g. ping mail.fred.com returns IP address like 111.222.111.222.
  2. View the certificate as above and note the server name under Issued To.
    e.g. elephant.giraffe.co.nz or *.giraffe.co.nz
  3. Edit the hosts file and add a new line for IP address 111.222.111.222. The hosts file is in %windir%\system32\drivers\etc.
  4. To open the hosts file, search for Notepad on the Start menu, right click on it and choose Run as Administrator. Paste the path to the hosts file in File, Open dialog. Select All Files as the file types on the right.
  5. The entry you create in the hosts file should look something like this.
    111.222.111.222 elephant.giraffe.co.nz
  6. Edit Outlook account settings and change the incoming and outgoing mail server to elephant.giraffe.co.nz

What does this do? Basically your mail server name needs to match the name on the certificate or Outlook will complain. The above process changes the mail server name to the name on the certificate and the hosts file will ensure that mail traffic to this server name will be correctly directed to your mail server.

NOTE:- If the certificate name is wildcarded, i.e. *.giraffe.co.nz, you could create a hosts file entry of anything.giraffe.co.nz, as the wildcard will cover anything.
NOTE:- you won't need to trust the certificate anywhere, as long as your mail provider is using a valid Certificate Authority to issue the certificate, which they certainly should be.

NOTE: This assumes the incoming and outgoing mail servers are the same. If they're not you may have to fiddle around with 2 server names.

Security Certificate Warnings in Microsoft Outlook was last modified: March 19th, 2022 by Diane Poremsky
Post Views: 220

Related Posts:

  • The security certificate is not from a trusted certifying authority
  • Common questions about self-certificates and Exchange server client co
    Exchange Server and Self-Certificate FAQ
  • Send from Other Addresses using POP3 or IMAP Accounts
  • SSL Security Alert on Office 365 Accounts (Fixed)

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Comments

  1. Paul says

    February 28, 2023 at 1:09 pm

    very late joining this discussion but it was very helpful to remove the certificate popup I was experiencing with my GMX mail account for all these years LOL. For some reason I needed to include the imap and also the smtp to make the cert message go away.

    Thank you for this as I have tried other solutions that just didn't work out.

    Reply
    • james says

      September 16, 2023 at 4:37 pm

      did this, did not help it still pops up. this happened after I renewed my subscription and only on
      my computer the other 3 are fine.

      Reply
  2. W.M. Willett says

    May 30, 2022 at 11:54 am

    I use Microsoft Outlook 2007 and was having the same problem. The solution for me was to download and install 2007 Microsoft Office Suite service pack 3. Hope this is helpful.

    Reply
  3. Simon Malka says

    July 13, 2021 at 2:28 pm

    This certificate popup can also keep appearing when the mail server matches that on the certificate, but the port number is wrong. I've encountered one provider publishing port 587, which when used caused this issue until it was changed to 465.

    Reply
  4. mosa phuma says

    June 28, 2021 at 3:38 am

    that work for me great job

    Reply
  5. Dream says

    June 20, 2021 at 8:01 am

    Thank you! That worked perfectly well. You're a genius.

    Reply
  6. Daniel Souza says

    May 17, 2021 at 9:01 am

    thanks, this solution worked for our company.

    Reply
  7. djkfglkaaaaa says

    January 3, 2021 at 11:33 am

    I don't get it. I have 5 accounts in outlook, and for EVERY ONE of them I keep getting these popups, tried everything, and these 'instructions' are very vague: if it says 'imap.gmail.com' do I then have to install it? or ping it first? or ping what server? This doesn't solve anything, each time I reopen outlook, the alerts are back...pfff

    Reply
  8. Benjamin Chong says

    July 12, 2020 at 12:44 pm

    Fantastic! Solved this nagging problem for me!

    Reply
  9. Benton says

    April 1, 2020 at 4:18 pm

    Thanks very much for this valuable information. The instructions are clear and easy to understand. I got an error after editing the hosts file and failed. The reason was that both my incoming outgoing mail server were not properly modified by adding the word mail. to the server I found from the certificate.

    Reply
  10. I. Halil Asilbay says

    February 16, 2020 at 4:10 pm

    Thank you so much. It works smoothly. A great solution.

    Reply
  11. Dave says

    December 2, 2019 at 9:08 am

    Thank you. This has been bugging me for years and I've never found a solution other than this that worked.

    Reply
  12. John says

    September 11, 2019 at 8:40 pm

    No idea if this is frowned upon here but I resolved an issue like this by just switching the outgoing and incoming encryption from SSL/TLS to None and after that the pop-up disappears.

    Reply
    • Isaki Dube says

      June 16, 2020 at 7:03 pm

      I don't care about the secure protocols anymore than having to deal with 5 popups every time I need to use Outlook. Microsoft has many unfixed issues that will still be there in Windows 50!

      Reply
  13. Rallo says

    April 21, 2019 at 9:14 pm

    What is it with Microsoft and repeating a message over and over and over, no matter how many times you reply? Company is manned by donkeys. Google is eating you.

    Reply
  14. david says

    March 18, 2019 at 8:24 am

    Thank you very much for being an unpaid debugger for Microsoft systems. Actually, you paid for this privilege. didn't you. You are making the world better for that monopoly called "You have no other practical choice - Microsoft."

    Reply
  15. Bernard says

    January 17, 2019 at 7:36 pm

    Thank you very much for this Brother

    Reply
  16. Paul says

    November 13, 2018 at 6:36 am

    Thanks a lot - very useful tip to edit the hosts file to match the server to the SSL cert :)

    Reply
  17. Bernardo Morais says

    November 8, 2018 at 3:56 pm

    You are a f****** genius! Thank you, oh IT lord!

    Saved the day!

    Reply
  18. Philip L Miller says

    November 7, 2018 at 8:54 am

    This is very maddening. My server certifdicate was renewed. It is up to date. And yet Outlook 2007 still "sees" the old expiration date. It does recognize the update letsencrypt certificate.

    Why is Outlook not registering the updated certificate? When you say install a new certificate. Where and how? All the algorithms keep changing. And iOS is even worse. Private key. Chain. Full chain?

    I had this problem for a year with InMotion Hosting when they updated a certificate.

    Reply
    • Diane Poremsky says

      November 9, 2018 at 8:10 pm

      Is it seeing the old one on the incoming or outgoing connection? (or both)
      Type certificate on the start menu to open the certificate manager - is the old one there?

      Reply
  19. Ted Waltman says

    May 20, 2018 at 3:09 pm

    Editing the hosts file worked great. Thank you for this article!

    Reply
  20. Will says

    April 15, 2018 at 11:05 am

    If anyone is getting this message and are using Outlook 2007 and you are using an older Microsoft email address (live, hotmail, msn) then your server probably needs to be updated in your Outlook 2007 email accounts settings.

    In my case, my server settings were all configured for the older LIVE.COM server which caused no issues under Outlook 2003 but when I moved to OUTLOOK 2007 recently, it became an issue. You will probably just need to update the name of your incoming and outgoing email server in your Outlook 2007 email accounts setup.

    In my case, just changing the name of the server in my email account did the trick for me:

    OLD:
    pop3.live.com
    smtp.live.com

    NEW:
    pop-mail.outlook.com
    smtp-mail.outlook.com

    BTW, nothing that I found on an internet search showed these settings would work with an older MSN account like mine. And never have I received any email from Microsoft telling me to update or change the server.

    Good luck.

    WIll

    Reply
    • Diane Poremsky says

      April 15, 2018 at 6:16 pm

      I know they popped up notifications when they moved to the new server - but it was mostly for people using the old Outlook Connector. POP and IMAP worked with the old server names - the new server names were in the outlook.com options but they probably figured everyone was using exchange. :)

      The server names work with all outlook.com accounts, regardless of the domain.

      Reply
  21. Riady says

    July 10, 2017 at 11:15 pm

    Amazing solution. thanks. works like a charm.
    now i can work out with outlook without clicking on yes every time

    Reply
  22. Sultan says

    June 18, 2017 at 7:13 am

    Thanks Diane, it works well for me. No more annoying warning.

    Reply
  23. George Czaplinski says

    March 1, 2017 at 1:45 pm

    My "Internet Security Warning" does not have "View Certificate."
    Where can I view the certificate?
    Thanks for your help

    Reply
    • Diane Poremsky says

      April 3, 2017 at 12:18 am

      if the button is not there (it isn't in some situations), you can't view it. Try John's solution to get past the problem.

      Reply
  24. Justin says

    March 22, 2016 at 8:33 pm

    John Roper-Lindsay fix works for outlook internet security warning target principal name incorrect. Thanks heaps I looked everywhere for this.

    Reply
  25. nana says

    January 12, 2016 at 12:48 am

    To publish the certificate, click View Certificate then Install Certificate. Choose Current user, click Nest then Install. but my problem is there is no install certificate button to click. How i'm going to install the certificate?

    Reply
    • Diane Poremsky says

      February 19, 2016 at 10:55 pm

      You can't publish it unless you have a copy of the certificate - usually a pfx file. Sorry.

      Reply
  26. Diane Poremsky says

    January 6, 2014 at 11:14 pm

    As an FYI, after you publish the certificate, you may still receive the 'do you want ot connect' dialog, but it should be less frequent.

    Reply
  27. Terry HelpMe says

    January 6, 2014 at 10:27 pm

    Wow. This didn't help at all. Publish what certificate in what certificate store? OMG. I think it has something to do with my incoming and outgoing servers as I am with AT&T but have and old sbcglobal email address. I think I'd rather kill myself than call AT&T.

    Reply
    • Diane Poremsky says

      January 6, 2014 at 11:10 pm

      target principle name error means the certificate was issued for different server names than you use for pop3/imap and smtp. You'll get it if you use mail.sbcglobal.com as the server name and redirect you to att (or yahoo) servers. Click view certificate then Install Certificate - choose current user, the click Browse and install it in the Trusted Publishers folder.

      Reply
  28. pcunite says

    February 19, 2016 at 8:15 pm

    Thank you John Roper-Lindsay, that worked.

    Reply
  29. Starbuck says

    May 18, 2017 at 1:00 pm

    I just setup IMAP for a new domain so this topic is suddenly relevant to me and my trusty Outlook 2010.
    I don't understand the need to add a hosts entry.
    If the name of the server connection is changed to match the certificate, nothing else should be required.
    Undoubtedly the mail server is accessible via DNS already.
    Having setup a new domain I wanted my email headers "branded" with mail.mydomain.tld. For this small site I'm using my shared-host's email server. Given that this is as-yet a new and small site, and such branding within email headers is not much more than a geeky attempt to hide the embarrassment of using a cheap shared host, I decided simplicity was much more important than vanity, and simply changed the connection host to clusterX.mail.myhost.com, which matches their cert.
    Sometimes the easiest and most obvious solution is the best.
    Now, if I'm missing something, and creating a hosts entry does allow my headers to have mail.mydomain.tld, I humbly request clarification of the solution.
    Thanks!

    Reply
  30. Diane Poremsky says

    May 20, 2017 at 3:05 pm

    The cheap server name is going to be in the header, you can't avoid it - at the very least it will show mail.yourdomain.com handed the message off to smtp.cheap-host.com. If you can change it in outlook, that works, but if your host doesn't have a general smtp address you would need to use the hosts file.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 31 Issue 5

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Jetpack plugin with Stats module needs to be enabled.
  • Sync Issues and Errors with Gmail and Yahoo accounts
  • Error Opening iCloud Appointments in Classic Outlook
  • Opt out of Microsoft 365 Companion Apps
  • Mail Templates in Outlook for Windows (and Web)
  • Urban legend: Microsoft Deletes Old Outlook.com Messages
  • Buttons in the New Message Notifications
  • Move Deleted Items to Another Folder Automatically
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Sync Issues and Errors with Gmail and Yahoo accounts

Error Opening iCloud Appointments in Classic Outlook

Opt out of Microsoft 365 Companion Apps

Mail Templates in Outlook for Windows (and Web)

Urban legend: Microsoft Deletes Old Outlook.com Messages

Buttons in the New Message Notifications

Move Deleted Items to Another Folder Automatically

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2026 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.