My iPhone 6 has no sound except when on speaker. What can I do?

my iPhone 6 has no sound except when on speaker.

When I raise and lower volume from the side toggles, the box comes up saying "Headphones" (volume in headphones) but there are no headphones plugged in.

When I do plug headphones in, I can hear perfectly. But when I unplug the headphones, the phone still acts as though they are plugged in.

Thoughts? Is there a setting I've accidentally changed?
Re: my iPhone 6 has no sound except when on speaker.

Try rebooting your device, and if that doesn't work, make a Genius Bar appointment with the nearest Apple Store to have them diagnose and fix the problem.

Original thread: https://forums.imore.com/threads/my-iphone-6-has-no-sound-except-when-on-speaker-what-can-i-do.355107/