Unable to remove page from Google Amp cache - wordpress

I'm having trouble using Google's API to update amp pages from a site I'm working on. The site is a Wordpress based site using WP Amp to generate amp pages, it appends /amp to any enabled pages.
I've read the documentation here and it seems like it should be a simple GET request using this structure:
https://cdn.ampproject.org/update-ping/c/s/www.example.com/example-category/example-page/amp
..which gives me a 204 No Content reply (to be expected Google's docs say). However, when retesting via my phone (with cache cleared etc) it is showing the same old amp page not the updated one.
Surely I'm missing something obvious, look forward to finding out what it is.

Figured this out finally after leaving it for a while and coming back to it.
The URL format for updating Google's cache is:
https://www-example-com.cdn.ampproject.org/c/s/www.example.com/example-category/example-page/amp
Google states that to update you need to have the /update-ping/ prefixing the /c/s switches but that never worked for me. After much trial and effort using the above format works for me every time.
If you run it in your browser expect to see the old version on first page load but if you refresh after that the updated amp page should show.

Related

LinkedIn sharing doesn't work as expected

I'm looking for an easy way to share through LinkedIn without all that hassle with OAuth 2.0 which I don't see required when I see other pages that use this kind of sharing (and they didn't required anything from - I can straight out share).
Straight to the issue:
this one works: https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frefair.me
this one doesn't: https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frefair.me%2Fjob%2F494
Seems like beyond main domain I can't get sharing working. For instance from other site a link that goes deeper and is still shareable: https://www.linkedin.com/shareArticle?mini=true&url=https://bulldogjob.pl/companies/jobs/2043-programista-java-warszawa-bms-sp-z-o-o&title=Programista+Java&summary=&source=https://bulldogjob.pl
I also tested with and without source and summary query params. Anyone had that issue?
LinkedIn uses the Open Graph protocol (http://ogp.me/) to determine how pages are shared in LinkedIn.
You may also use the LinkedIn Post Inspector (https://www.linkedin.com/post-inspector/) tool to debug how various pages would be shared in LinkedIn.
I decoded your URL so I could get a cleaner look...
https://www.linkedin.com/sharing/share-offsite/?url=https://refair.me/job/494
So, let's try to visit your URL: https://refair.me/job/494 . The webpage you are sharing DOES NOT LOAD.
Is your site down for everyone? Yes, your site is down for everyone.
In order to share a URL on LinkedIn, you must fulfill the following minimum requirements:
The URL must load.
If you just want to test out the API, try using wikipedia.org or google.com as test pages.
Surprisingly, the old refair.me URL by itself works fine in LinkedIn, but that could be from some internal cache, from way back in the day when the page once did work. It certainly does not do so anymore.

Wordpress Api not up to date

I'm working on a project using WP's API along with VueJs + Nuxt for the front-end. Everything seemed to be working just fine, but since yesterday not all of my changes are fetched by the API.
It's really weird because, in the WP admin my changes are displayed as normal, but when looking at the response using postman, I can only see what was on my site prior to my changes, or only a few recent changes that don't even appear on the final render.
I am not using any type of extensions for cache as of now, but I've tried several extensions to empty it anyway, even if all of them signaled me that nothing is in the cache.
Could it be that the API got somehow "stuck" at some point and now no update is ever taken into account? Then is there anyway to "reset" this and force it to update?
Problem solved! I am using Gandi to host my site and I had no idea thye used Varnish as a caching solution. Disabled it and everything went back to normal. Thanks for your answers!

How do I update my website cached version on Google cachedview?

I am developing a website and I faced an issue today on my site, I will try to briefly explain the scenario hoping anyone could give a proper explanation for it.
My website is a WordPress website and I have the coming soon page activated so users will be redirected to it.
Two days ago I turned that plugin off by mistake and users were able to see my page. Today I turned it back on, and that's where the issue arises.
In full web (desktop) the coming soon page is visible and working fine, but when I hit the responsive view on my chrome browser the page is still available and the welcome page is not. In the sources tab, I can see the hosted directory being loaded so I went to the hosted directory (public_html) and I hid the folder that contains all the assets (renamed it to .foldername).
I hit refresh still loads the old page when I hit ctrl+shift+r I get the new version. On Firefox the scenario isn't reproducible it just happens on responsive view on Google Chrome browser.
Can anybody explain to me what's happening I assume it has something to do with Google caching my webpage and never updating it. But if like to hear a more professional explanation Thanks.
Have you tried clearing your Cache in Google Chrome? Also, Have you enqueued any Scripts or Styles in your functions.php file? If so, increase their version number. This will force the browser to download the Scripts and/or Styles again rather than loading any Cached copies.
Hope this helps to resolve your problem(s).

Making your site shareable on LinkedIn

I'm having a few issues with making our site shareable on linked in and I'm at a loss. The og: meta tags all look fine, the facebook scraper picks it up fine, but the linkedIn scraper does not... and the img etc are not on a protected folder or anything like that.
When inspecting the developer tools the get request to the url-preview?url= link shows that the img etc.. aren't there.
The image is less than 1mb, all og: meta tags are obeyed. The only think that may not be 100% is the image ratio is not 1/4 or 4/1 (it's 2/1)... But that is only a recommendation and not a hard and fast rule.
Does LinkedIn provide something similar to FB (https://developers.facebook.com/tools/debug/) where you can test the scraper and re-run it? Or is there another way to debug this? Any help appreciated.
https://www.hipla.co.uk (is the page i'm trying to share).
cheers
It transpires linked in doesn't offer a similar facility to FB or twitter to test the OG meta tags and re-scrape the page. They cache a page for 7 days and then re-scrape again. However, you can refresh the linkedIn crawler cache simply by appending GET params to the URL, i.e. https://www.hipla.co.uk?123.
I eventually figured out what our issue was. We were using a wildcard cert (for multi domain, so we could have a single ssl cert for multiple subdomains) which meant we had to set the server name in the apache default-ssl.conf file, but we had a typo in it for the www instance ... which meant it gave an SSL error (for the linkedIn crawler) which isn't debuggable (if that's a word) using linkedIn but was spotted as we got an SSL error when testing the twitter metadata tags using the twitter card validator. Hope this helps anyone else who has a typo in their ssl settings. Note that the ssl error was not visible using a browser(s) as all looked fine.

Google Analytics code not working on Wordpress site

We have a Wordpress site that has been running GA code fine for years. We noticed recently it had stopped reporting and that GA reports the code is not installed. The code is clearly there in the page source - I have tried sticking it directly into the code in the head and in the footer, I have tried using the theme to insert it and thirdparty plug-ins - nothing works.
I have tried changing the theme to the standard WP theme, I have tried turning off plug-ins one at a time (might try turning all off at once tonight!). I have tried removing the .htaccess file.
It feels like something is blocking it but can't figure out what.
Looking at the date of when it stopped working I think it is around the time we upgraded the PHP version of the server but not sure how this would have affected it and there are other Wordpress installs on the same server that are still collecting GA data perfectly happily!
Any advice welcome this is driving me insane now! Site can be viewed here: goo.gl/UO6deJ - Sorry if this has already been covered but everything else I read seemed to be related to plugins not functioning as they should.
As #Fazz mentioned, you have two instances of the same code which would duplicate all your data and skew your results. Also, you can check your Real-Time reports to see if you are tracking your own visits simultaneously. If you can see hits in your RT reports, then likely your tracking code is good. You can also install Google Tag Assistant to help diagnose any other issues with your tracking code.
Can you check to see if you were migrated from classic GA to UA? Usually you should wait 48 hours from initial installation before seeing data in your standard reports (but you should still see data in RT).

Resources