URL shortening via Bitly and AMP mobile auto redirection issue
-
Problem: When using AMP for WP plugin and turning on mobile redirection in the Advanced Settings, I’m noticing that links shortened via bit.ly work on desktop but break on mobile. When viewing the campaign link on mobile, bit.ly fails to add either
/amp/
or/?amp
after the URL, resulting in an error when loading the bit.ly shortened URL on a mobile device. Example:Working AMP URL without bit.ly redirection:
www.domain.com/site/post/amp/ or www.domain.com/site/post/?amp
URL that would work on mobile with bit.ly campaign info added… but this isn’t the redirect that bit.ly provides on mobile:
www.domain.com/site/post/amp/?utm_campaign=campaign-name&utm_medium=social&utm_source=facebook&utm_content=
orwww.domain.com/site/post/?amp&?utm_campaign=campaign-name&utm_medium=social&utm_source=facebook&utm_content=
URL for mobile when redirected by bit.ly:
www.domain.com/site/post/?utm_campaign=campaign-name&utm_medium=social&utm_source=facebook&utm_content=
–> breaks on mobile when mobile redirection is on in AMP for WP because it’s missing/amp/
or/?amp
Possible solutions:
1. Turn off mobile redirection in AMP for WP. This works but then we don’t get the benefit of mobile visitors automatically seeing the AMP version of our site.
2. Always use the AMP version of the URL for bit.ly link shortening and leave mobile redirection on. This would result in old bit.ly links breaking on mobile, but otherwise seems like a good solution.Is there a third option? Some way of rewriting the bit.ly links to include the required AMP end point (
/amp/
or?amp
) when required?
- The topic ‘URL shortening via Bitly and AMP mobile auto redirection issue’ is closed to new replies.