TechBuzzPro

Remove Tracking Parameters from URL on iPhone Mac

· 4 min read · Phones & Tablets

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can remove tracking parameters from URLs on iPhone and Mac, either manually or with built-in tools and shortcuts. This process strips extra data like utm_source, ref, or fbclid from links, helping protect your privacy and shorten URLs. While neither iOS nor macOS removes these automatically, you can use tools like Shortcuts, Safari, or third-party apps to clean URLs before sharing or opening them.

What You'll Need

  • iPhone or Mac with the latest operating system
  • Safari browser (default on both devices)
  • Shortcuts app (preinstalled on iPhone; available on Mac via the Mac App Store)
  • Optional: a trusted URL cleaner app or browser extension (on Mac)

Step-by-Step

  1. Copy the URL with tracking parameters. This could be from a message, email, or webpage. Long links with elements like ?utm_source=, &ref=, or ?fbclid= contain tracking data.
  2. On iPhone, open the Shortcuts app. If you don’t have a shortcut to clean URLs, create one: tap the + icon, then "Add Action."
  3. Search for "Get URLs from Input" and add it. This pulls the URL from your clipboard or share sheet.
  4. Add another action: search for "Text" and insert a text field. Tap into it and type: ^(https?://[^?#]+). This regular expression captures the base URL before any parameters.
  5. Add the "Replace Text" action. Set it to use the Regular Expression mode. Paste the regex into the "Find" field. Leave "Replace" empty or confirm it’s set to capture Group 1 (the base URL).
  6. Add "Copy to Clipboard" as the final action. Name the shortcut "Clean URL" and save it.
  7. Now, when you have a tracked link, use the Share Sheet, tap "Shortcuts," and run "Clean URL." The base URL is copied without tracking strings.
  8. On Mac, open Safari and copy a URL with tracking parameters. Open the Shortcuts app and create a new shortcut with the same steps: Get URLs from Input > Replace Text using the regex ^(https?://[^?#]+) > Copy to Clipboard.
  9. Run the shortcut from the menu bar or by right-clicking the link and using the Services menu (if enabled in System Settings > Keyboard > Shortcuts > Services).
  10. Alternatively, on Mac, install a Safari extension like "Purify" or "Link Cleaner" from the App Store. These automatically strip tracking parameters when you click a link.
  11. Enable the extension in Safari > Settings > Extensions. Once active, it runs in the background, cleaning URLs as you browse.
  12. Test the setup by copying a long URL with utm tags, running the shortcut, and pasting the result. It should show only the domain and path, not the extra parameters.

Common Mistakes

  • Forgetting to enable Regular Expression mode in the Replace Text action, which causes the shortcut to fail silently.
  • Using an incorrect regex pattern, such as missing the protocol (http:// or https://), which can result in incomplete URLs.
  • Not testing the shortcut with a real tracked link before relying on it, leading to unexpected results.
  • Assuming Safari removes tracking by default—neither iOS nor macOS does this without user setup.
  • Overlooking extension permissions on Mac, which can prevent Safari extensions from working after installation.

Tips

  • Use the same shortcut across devices by enabling iCloud sync for Shortcuts in your Apple ID settings.
  • Assign a keyboard shortcut to your URL cleaner on Mac for faster access.
  • Combine the cleaned URL with a URL shortener action in the same shortcut if you plan to share it.
  • Use the shortcut from the Share Sheet in Messages or Mail for quick cleaning before forwarding links.
  • Regularly update your shortcuts and extensions to ensure compatibility with system updates.

Troubleshooting

If the shortcut doesn’t clean the URL, first check that Regular Expression mode is enabled in the Replace Text action. If it still fails, re-enter the regex ^(https?://[^?#]+) carefully—typos break the pattern. If using a Safari extension, verify it’s enabled in Safari > Settings > Extensions. Restart Safari if the extension isn’t active. On iPhone, if the shortcut doesn’t appear in the Share Sheet, go to Settings > Shortcuts and ensure "Allow in Share Sheet" is on. If the cleaned URL is incomplete (e.g., missing "https"), adjust the regex to ensure it captures the full protocol. If nothing works, reinstall the Shortcuts app or restart the device to reset any temporary glitches.

Frequently Asked Questions

Does Safari on iPhone automatically remove tracking parameters?

No, Safari does not automatically strip tracking parameters from URLs. You must use tools like Shortcuts or third-party apps to remove them.

Can I use the same shortcut on both iPhone and Mac?

Yes, if you sync Shortcuts via iCloud, you can create the shortcut on one device and use it on the other.

Are tracking parameters harmful?

They are not dangerous but can be used to monitor your online behavior across sites. Removing them enhances privacy.

Do URL cleaner extensions work on all websites?

Most do, but some sites may re-add parameters dynamically. Extensions work best on static links copied from emails or messages.

Can I share cleaned URLs directly from the shortcut?

Yes, add a "Share" action at the end of your shortcut to send the clean URL via Messages, Mail, or other apps immediately.

Is it safe to use URL cleaner apps from the App Store?

Yes, if they are from trusted developers and do not request unnecessary permissions. Always review app reviews and privacy labels.