We have just implemented the _escaped_fragment solution in our testing environment along with a headless browser (phantom.js) to make our site crawlable by google.
The issue is I cannot find any solution for how to test this before pushing this change to our production environment.
The fetch as google link in webmaster tools doesn't work. Is there another way we can test this quickly instead of waiting for the google crawler to crawl our site?
You could write a bookmarklet that mucks with the URL of the page. It would replaces the #! with ?_escaped_fragment= and URL encodes the hash bang params. Then you could at least manually go through your site, activate the bookmarklet on any page and verify that you get the content that you expect.
Related
According to Google Search Console Live Test on https://www.energycouncil.com.au/ returns text that does not exist on the viewable website.
Why is completely different source returned when using the Google Search Console with a Live Test?
I worked it out.
Code had been injected into a source code file that redirects the site if it is a website indexer. Ingeniously, this code did not do anything for over a year so I didn't see the issue as no files appeared to be recently modified.
To find the issue, download the live site and search it for "redirect"
Situation:
I am writing test automation for a website. There comes a point where there is a link button on my website. Clicking this I am redirected to an external website. There I have to log in and as soon as I do that I am redirected to my original web-page which contains some 'connections' that I need.
Problem:
As soon as cypress clicks on the redirection button it does into a blank page.
Ideal solution:
I would want to automate the entire scenario. If not then at-least a work around.
As suggested in the Cypress Docs, you should really be using cy.request() to log in. You don't control a 3rd party site, and that makes your test very flakey.
For example, a lot of login pages are constantly changing and are A/B tested for the purpose of preventing a bot from logging in, including testing bots. The data:, url is probably the result of a http redirect.
Thankfully, using cy.request() you can 'fake' logging in by making a request to the server through code (which doesn't change as much) and you will never have to leave your app to log in
Here's a recipe for Single Sign-On for example.
Hope that makes sense!
is there any way that I can inform the google bot that to get additional languages it needs to have a cookie set?
for example, at https://www.famistar.com the user can click at the bottom of the page to change language. What really happens under the hood is that the button via js will set a cookie and will reload the page.
Is there any way (withought modifying the urls or adding a url parameter for language) that we can notify google bot to crawl all provided languages?
Google can't ready cookies and sessions, and to prove this user "Web Developer Tool" on any browsers and disable the cookies.
The only way that Google can index and crawl your languages is to add them as a level in the URL "mydomain.com/en" or add them as sub-domain "en.mydomain.com" or parameter.
Also don't forget to add "hreflang" in the to make sure Google will understand your structure.
I have this reactjs webapp - http://52.26.51.120/
It loads a single page and then you can click links to dynamically load other boards on the same page... such as 52.26.51.120/#/b, 52.26.51.120/#/g
Now the thing is, I want each of these to be an individual page, for the purpose of seo. I want you to be able to google "my-site.com g", and you will see the result 52.26.51.120/#/g. This obviously cant work if you are using reactjs and it is all on one page. Google will only render and cache that main page (can it even render that page? does google execute javascript?)
Even more specifically, id want something like my-site.com/g/1234 to load a thread. There could be a thousand threads every day, so im not sure how to handle that.
Are there any solutions to this? to allow react to possibly serve up static pages as html so that they can be cached on google? I am using expressjs and webpack as my server right now, and all the code is executed in jsx files.
Thanks
You can use Prerender.io service. In a nutshell you will need to connect your server app or web server with prerender service and do little setup (see documentation). After that search engines and crawlers will be served with a static (prerendered) content while users will get classic React.js (or any other single page) app.
There is a hosted service with free tier or open source version
I suspect you could do some smart configuration with nginx and it could convert a url of domain/board to a redirection of domain/#/board when detecting the user-agent as a bot instead of a typical user.
I've tried to evaluate my website with PageSpeed and I saw most warnings (Leverage browser caching, combine external javascript...) come from Google Maps API integration.
So my question is, is there a way to use it as PageSpeed would like?
Thanks.
Probably not, the external js files can change. If you combine them or host them locally with expires headers you may encounter bugs when they change.
I suggest to read this article in Google Blog: https://maps-apis.googleblog.com/2015/09/map-tips-speeding-up-page-load-times.html
Asynchronously loading JavaScript on your pages can give you huge performance wins. We have just updated all of our JavaScript Maps API samples and you can make these changes to your site, too. Read on to find out what we did and how it works, or skip straight to Unblocking scripts to see what you can start to update on your site today.