AMPXF - AMP for Xenforo 2

AMPXF - AMP for Xenforo 2 [Paid] 1.4.9

No permission to buy (€50.00)
@mazzly not using this addon as not on XF 2.2 but previously tried AMP for XF 1.5 (but my non-AMP pages were faster for me).

But looking at example sites that use this addon. Seems you're missing a few AMP runtime optimizations for hosted amp pages which are served outside of Google mobile search results (which won't have AMP CDN cache benefits) for rel=preload for js and preconnect/dns-prefetch for the google fonts if applicable at least https://amp.dev/documentation/guide...ize-and-measure/optimize_amp/?format=websites. Have you already tried that? Might help squeeze a bit more performance for self hosted amp pages.
 
Any issue if Litespeed is enabled?
Well not that I know of, but I don't know if any of the current users have Litespeed running :)

Any new errors when using Siropu ads manager?
I don't think there was ever errors related to the Siropu ads manager.

It is Siropus Keyword Linking that had some incompatibility things.

@mazzly not using this addon as not on XF 2.2 but previously tried AMP for XF 1.5 (but my non-AMP pages were faster for me).

But looking at example sites that use this addon. Seems you're missing a few AMP runtime optimizations for hosted amp pages which are served outside of Google mobile search results (which won't have AMP CDN cache benefits) for rel=preload for js and preconnect/dns-prefetch for the google fonts if applicable at least https://amp.dev/documentation/guide...ize-and-measure/optimize_amp/?format=websites. Have you already tried that? Might help squeeze a bit more performance for self hosted amp pages.
I have a task added for myself to look into that and some other optimizations. For now the current version is "fast enough" and there is more focus to be put onto compatibility with other addons and themes etc..

Looking at that article it mentions self-hosted, and I don't think any forum using this addon would ever do that, as what we are interested in is actually utilizing the AMP caches etc so that Search engines can load up a page instantly.. But I might be mistaken since I only skimmed it quickly. :D
 
Looking at that article it mentions self-hosted, and I don't think any forum using this addon would ever do that, as what we are interested in is actually utilizing the AMP caches etc so that Search engines can load up a page instantly.

In real world, AMP pages won't always be served via Google CDN AMP cache as there are other platforms which can now auto detect AMP pages and serve them based on detected amphtml referenced AMP pages besides Google search. For example, Twitter on mobile https://developer.twitter.com/en/docs/twitter-for-websites/amp/overview
Twitter supports the standard AMP discovery mechanism. When a link is shared on Twitter, the Twitter crawler (user agent: Twitterbot/1.0) will look for a <link rel="amphtml"> element in your document. If a valid AMP document is referenced, Twitter mobile clients will direct users to that AMP edition of your page.

Now, when using one of Twitter's mobile clients, users will be sent to the amphtml URL in their browser, instead of the link that was shared in the Tweet. Users will load this link directly, not via a page cache.
 
In real world, AMP pages won't always be served via Google CDN AMP cache as there are other platforms which can now auto detect AMP pages and serve them based on detected amphtml referenced AMP pages besides Google search. For example, Twitter on mobile https://developer.twitter.com/en/docs/twitter-for-websites/amp/overview
Ahh cool, didn't know that. Thanks!

I've been peeking a bit at the AMP optimizer and thinking to add it also as the "last layer" before sending the page off, but it is at the moment a bit down the list of things to be fixed :D
 
Ahh cool, didn't know that. Thanks!

I've been peeking a bit at the AMP optimizer and thinking to add it also as the "last layer" before sending the page off, but it is at the moment a bit down the list of things to be fixed :D

Yeah if you can breakdown your Google Analytics page speed metrics by source and compare say Google Mobile vs Twitter Mobile referrals for same AMP enabled URLs, you could probably see how different page speed performance is from possible Google CDN AMP cache vs non-AMP cache origin self-hosted AMP pages.
 
We don't use the "default_src", I would have added "data:" to "script-src".
We don't use "Default.src" at all but have added our domain directly to "script-src". "https: //*.mydomain.tld" and "https: //mydomain.tld".

It is not easy to help here because this security level has to be tailored very individually to the respective domain and its requirements.

Notice to all users of GoogleADs.
You have to find out via the console which servers are blocked by this header and add them to the header.
Spellings such as https: //*.google.com are also allowed to avoid redundancy.
 
Thank you! That has kinda been my intention ;)


Sadly these headers are not my forte, but I know @Masetrix and @briansol where using similar ones at some point, maybe they can advice?

I know the amp-bind docs mention CSP headers here:
View attachment 243919
ugh, i struggled with these for a long time and eventually just removed them and allow everything without a CSP. It kept blocking 3rd party ad unit images/etc all the way down the doubleclick tree and so forth.

this worked with the exception of some jquery code (date_from_x) phrases do not parse in firefox and some safari and some ads failed to load.

maybe with a bit more tweaking.

But, the idea of whitelisting things we don't own will always be a challenge. some new network joins the chain every hour. It's a goose hunt.

Code:
Header set Content-Security-Policy "base-uri 'self'; manifest-src 'self'; script-src * 'self' blob: https://apis.google.com https://raw.githubusercontent.com https://apis.google.com https://cdn.ampproject.org https://ampproject.net https://ampxf.com ; script-src-elem * 'unsafe-inline' data: blob: https://cdn.ampproject.org https://ampproject.net; style-src * 'self' 'unsafe-inline' https://cdn.jsdelivr.net; connect-src * https://pagead2.googlesyndication.com https://www.googletagmanager.com https://googleads.g.doubleclick.net https://adservice.google.com https://www.google-analytics.com/ https://cdn.ampproject.org/ https://ampproject.net ; img-src * data: https://cdn.ampproject.org https://*.ampproject.net; form-action 'self'; frame-ancestors * 'unsafe-eval' 'unsafe-inline'; sandbox allow-same-origin allow-scripts allow-forms; upgrade-insecure-requests; font-src * 'self' data: https://cloud.typography.com https://fast.fonts.net https://fonts.googleapis.com https://use.typekit.net https://maxcdn.bootstrapcdn.com https://use.fontawesome.com;"
 
Hi everyone,

I am very interested in this add-on.
Just one question.
@mazzly : on your website you write :
  • AMP pages will only be shown to users that are using a mobile device.
My XenForo website has a maximum of 20% visits from mobile, 80% from desktop.
Would you say that the AMP add-on will improve also my SEO for finding my website for a browsing through Desktop.

Many thanks

David
 
Anybody using this with Siropu's Ad Manager and knows if image only placements work for ads?
 
My XenForo website has a maximum of 20% visits from mobile, 80% from desktop.
Would you say that the AMP add-on will improve also my SEO for finding my website for a browsing through Desktop.
Good question!

I don't think you will see SEO improvements for desktop searches, as AMP is for mobile, although I don't know what Google/Bing does in the background.

But you can consider that the reason you only have ~20% visits from mobile traffic, might be that mobile search results are not being prioritized?
- It can also ofc be many other factors, but a nice hypothesis, isn't it? ;)

Anybody using this with Siropu's Ad Manager and knows if image only placements work for ads?
I don't know, but if not possible, I would imagine Siropu could add some support for either:
  • Allowing his addon to manipulate the ad positions that AMPXF provides
  • create some <xf:siropu_image_ad id="foo"></xf:siropu_image_ad>-tag that you could insert into an AMP ad-position
Hope that helps a bit :)
 
Reporting back, your bot is fully working and identified just some 3 minor issues on 3 different threads. My solution? Deleted the damn threads and the problem is gone :cool:

BTW, I'm having 3 reports on GSC:

Crawl issue

Malformed URL found for attribute 'href' in tag 'a'.

Malformed URL found for attribute 'src' in tag 'amp-img'.

Is affecting 7 pages.

Any tips on that?
 
Deleted the damn threads and the problem is gone :cool:
:) ...personally, I fix any malformed threads by editing them. If I can't correct the link or reference in the post from years ago, I remove the problematic reference altogether and replace it with "[Edit: link / reference no longer exists]" .... so at least the web surfer gets all the rest of the context and if needed, can engage & ask (rather than obliterating the otherwise SEO-friendly content from history).

In this respect, AMPXF can also serve as a site doctor of sorts.
 
Reporting back, your bot is fully working and identified just some 3 minor issues on 3 different threads. My solution? Deleted the damn threads and the problem is gone :cool:

BTW, I'm having 3 reports on GSC:



Is affecting 7 pages.

Any tips on that?
Well, the 'href' in tag 'a' are usually related to someone having posted a link that is malformed (not valid)

for the 'src' in 'amp-img' I cant say, but could you maybe open a support ticket and paste the affected urls?

:) ...personally, I fix any malformed threads by editing them. If I can't correct the link or reference in the post from years ago, I remove the problematic reference altogether and replace it with "[Edit: link / reference no longer exists]" .... so at least the web surfer gets all the rest of the context and if needed, can engage & ask (rather than obliterating the otherwise SEO-friendly content from history).

In this respect, AMPXF can also serve as a site doctor of sorts.
That is a good idea, probably the affected pages are pulling in some amount of traffic, so by deleting them you are "lowering your traffic"..

The AMP Robot has been built with that purpose in mind: help forum owners improve their content's validity, as it is needed for AMP to work :)
 
Malformed URL found for attribute 'src' in tag 'amp-img'.

Any tips on that?
You get this message if an [ img] tag was found in a (broken?) [ url] tag
 
  • Like
Reactions: Lee
yup. i think people having never converted from another forum platform to xenforo would probably see less issues on their board. all of my issues are from really old threads which got messed up during conversion.

the checking bot does not see the fixes immediately which is kind of annoying. have to wait for a few minutes for it to notice the fix. small issue though. i doubt ?amp=1 pages are cached. google's own urls are cached for a long time i think.
 
yup. i think people having never converted from another forum platform to xenforo would probably see less issues on their board. all of my issues are from really old threads which got messed up during conversion.

the checking bot does not see the fixes immediately which is kind of annoying. have to wait for a few minutes for it to notice the fix. small issue though. i doubt ?amp=1 pages are cached. google's own urls are cached for a long time i think.
Some, like us, for example, have already carried out several migrations.
phpbb -> vBulletin + various seoaddons :unsure: -> XenForo 2.x .

So now we were able to fix a few hundred broken links (and others), also with the Amp for XF bot.
 
Just an FYI 1.1.4 appears to have resolved issues with fonts (for UIX) as well as patching issues with UIX themes that were not HTML5 compliant (and thus errored by Google AMP bot). Looks like Google is slowly starting to reindex amp pages. Great job by @mazzly on working around these issues that were not the fault of his addon.
 
Top Bottom