Ajax Content from Blocked Resource

by James   Last Updated March 22, 2017 03:04 AM

I have a site built in AngularJS. Most of the dynamically-loaded content comes from a Wordpress back-end that is separate from the AngularJS site. In fact, it's a completely different domain and we do not want the public going to any of its un-styled pages/posts/media/etc. Thus, in the Wordpress settings, we've checked the search engine visibility setting to "Discourage search engines from indexing this site"

Now, if I try to fetch and render one of the pages from our AngularJS site, Google Search Console is blocking/not rendering any of the content coming from that Wordpress site.

Can anyone help find a solution to getting Google to render this AJAX content? Once again, the Wordpress is only supposed to be a "back-end" and we DO NOT want people visiting any of its URLS. We just want to fetch the data from that back-end and render it on our AngularJS site.

Please let me know if you have any possible solutions, advice, etc.

Thank you so much!



Answers 1


Google needs to be able to fetch the content from the WordPress site to be able to render the pages from your Angular.js site. Checking the "Discourage search engines from indexing this site" disallows crawling in the site's robots.txt file. This prevents Googlebot from fetching the content, even when called from another domain.

Instead, you want to allow Googlebot to fetch the content but tell it about the preferred URL where it can be viewed. You can use a meta rel canonical tag on each page of the WordPress site to point Googlebot to the corresponding page on the Angular.js site. For example, wordpress.example.com/some-page might have the tag <link rel="canonical" href="http://angular.example.com/#some-page" />

Stephen Ostermiller
Stephen Ostermiller
May 04, 2017 12:32 PM

Related Questions



Conflicts between JSON-LD structured data objects?

Updated December 30, 2017 06:04 AM


Angular2 : 'Fetch as Google' doesn't render page

Updated April 02, 2017 07:04 AM

Do dynamic meta and title tags confuse Google in 2018?

Updated January 08, 2018 11:04 AM