Outlook resolving to old exchange server

We migrated to Office 365 from our Exchange on-premise server yesterday. We are experiencing a problem with many PCs where, on the PC of a user for whom we are setting up an Outlook profile to connect to their Office 365 account, we have to change that PC's primary DNS server to point to a DNS server outside our facility or else the it will try and set their mail server to the old mailserver even though we've added all the DNS records that we added on the public DNS servers to our internal DNS server.

We are setting the PC's primary DNS server to, configuring their outlook profile, then setting their DNS back to DHCP. That seems to work for setting up the profile.

But, after a while, the server name on their email profile will change from something like this
8b97ea0e-56db-419a-923a-a54ce7d8a86d@whitewater.com, which is the correct thing, back to the old on-premise server SERVERMX2.relyonus.local

What am I missing? Why, despite our internal DNS records pointing to Office 365, is Outlook wanting to badly to resolve to the old mailserver instead of Office 365? Is this something in Active Directory?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AmitIT ArchitectCommented:
Can you check for .prf file in office folder on client machine.
Vasil Michev (MVP)Commented:
Easiest thing to do is to use the reg keys detailed in this article to bypass the local AutoD lookups: http://support.microsoft.com/kb/2212902

All you need working for EO is the HTTP Redirect method.

Apart from that, you might consider converting the on-prem mailboxes to MEUs, removing the SCP or autodiscover vdirs altogether, or even decommissioning the on-prem server. Those things can of course cause some disturbance and might not be applicable to your situation, so just use the reg keys as a quick remedy.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Have you checked the Time to Live (TTL) on the internal DNS records?
David11011Author Commented:
Thanks for your help with this. This fixed the problem. I added this registry key to the computers and it is working now. Here is the Key if anyone is interested.

Windows Registry Editor Version 5.00


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.