Before heading to the Apple Store for a repair, try the following steps. They’ll help you figure out if your iPhone headphone jack is really broken or if there’s something else going on that you can fix yourself—for free.

First, Try Other Headphones

The first thing to do when trying to fix a broken iPhone headphone jack is to confirm that the problem is with your headphone jack, not the headphones themselves. It would be better if it’s the headphones: it’s usually cheaper to replace headphones. The easiest way to do this is to get another set of headphones—ones that you already know work properly—and plug them into your iPhone. Try listening to music, making calls, and using Siri (if the new headphones have a mic). If everything works properly, then the problem is with your headphones, not the jack. If the problems still happen even with new headphones, confirm that the headphones work on another device and then move on to the next step.

Clean the Headphone Jack

Many people keep their iPhones in their pockets, which are full of lint that can find its way into the headphone jack (or the Lightning port, on models that don’t have a headphone jack). If enough lint or other gunk builds up, it can block the connection between the headphones and the jack. If you suspect lint or other build-up is your problem:

Look into the headphone jack to check for lint. You may need to shine a light into the jack to get a good look.If you see lint, blow into the headphone jack or shoot some compressed air into it (compressed air is better since it doesn’t have the moisture that’s present in breath, but not everyone has it handy). This may be enough to remove anything that’s built up in the jack. If the lint is packed tightly and can’t be blown out, try a cotton swab. Remove most of the cotton from one end of the swab. Put a tiny bit of rubbing alcohol on the end you removed the cotton from. Then insert that end into the headphone jack. Move it around gently and try to pull out the lint.If that didn’t work, or you don’t have a cotton swab, flatten out a paperclip. Wrap some tape around one end, being careful to not wrap so much that it’s larger than the headphone jack. Insert the tape end into the headphone jack and twist it a couple of times. Gently pull it out, dispose of any debris, and repeat as necessary.

Restart Your iPhone

It might not seem related to problems with the headphone jack but restarting the iPhone is often a key step in solving problems. That’s because a restart clears the iPhone’s active memory (but not its permanent storage, like your data; that won’t be touched), which could be the source of the problem. And since it’s easy and quick, there’s no real downside. How you restart your iPhone depends on the model, but some general guidelines are: If holding down just the on/off button doesn’t restart the phone, try a hard reset. How you do this depends on what model iPhone you have. If you’re still not able to hear audio, move on to the next item. On an iPhone 6 or older, just hold down the Power button.

Check Your AirPlay Output

One reason that you might not hear audio through your headphones is that your iPhone is sending the audio to another output. The iPhone is supposed to automatically recognize when headphones are plugged in and switch audio to them, but it’s possible that hasn’t happened in your case. One potential cause is that audio is being sent to an AirPlay-compatible speaker or AirPods. To check for that: With those settings changed, your iPhone’s audio is now being sent to the headphones or the iPhone’s built-in speakers. If that doesn’t solve the problem, there’s another, similar setting to investigate.

Check Bluetooth Output

Just like audio can be sent to other devices over AirPlay, the same thing can happen over Bluetooth. If you’ve connected your iPhone to a Bluetooth device like a speaker, it’s possible the audio is still going there. The simplest way to test this is to:

Your Headphone Jack is Broken. What Should You Do?

If you’ve tried all of these options and your headphones still aren’t working, your headphone jack is probably broken and needs to be repaired. If you’re very handy, you can probably do this yourself—but we wouldn’t recommend it. The iPhone is a complex and delicate device, which makes it hard for regular people to repair. Plus, if your iPhone is still under warranty, fixing it yourself voids the warranty, which means Apple won’t help you fix problems you cause. Your best bet is to take it to the Apple Store for a fix. Begin by checking your iPhone’s warranty status so you know if a repair is covered. Then, set up a Genius Bar appointment to get it fixed. Of course, there’s always the choice of upgrading to the latest iPhone and leaving the world of wired headphones behind. Good luck!