0

our config for the Angular routing is placed inside the main html page (so not in a separate .js file).

In that routing the paths to all of our html fragments are placed, like this

account: apiUrl + '/account/:method',
offer: apiUrl + '/offer/:type/:id/:endpoint',
order: apiUrl + '/order/:type/:id/:endpoint',
prospect: apiUrl + '/prospect/:type/:id/:endpoint'

Now the Google indexer is indexing all these url's (which do not realy exist), even though the config part is within a <script> block (it looks like it sees a forwards slash and thinks:"Hey, this might be a url").

One solution I came up with is to exclude the files in the robots.txt, but that gives the problem on for example our home page that some parts of the page can not be retrieved by Google because it isn't allowed (via the robots.txt) to retrieve the partial html.

So what I realy want to say is: yes, please index my site, but 'things that appear to be paths' in our JavaScript are not url's for visitors of our site.

Related could be: we didn't create this site ourself, is there a specific reason that this part is in the homepages' index.html? All the other Angular JavaScript is in separate .js files.

Michel
  • 23,085
  • 46
  • 152
  • 242
  • https://www.google.com/webmasters/tools/removals – Shota Dec 03 '15 at 09:48
  • Thanks, but that is not exactly what I'm looking for. I want to prevent the "url's" (they are not realy urls but they look like it) from being indexed – Michel Dec 03 '15 at 09:52
  • robots.txt should work, maybe it just needs some time, you can also use meta tag with noindex option: https://support.google.com/webmasters/answer/93710?hl=en , – Shota Dec 03 '15 at 09:56
  • Yeas I could use robots.txt, but like I said, it then also blocks other content. What I am looking for is to prevent the 'urls' being seen as urls (which they are not). – Michel Dec 03 '15 at 10:08
  • Take a look at this: http://stackoverflow.com/questions/15659419/prevent-urls-form-javascript-array-from-google-indexation – Shota Dec 03 '15 at 10:14

0 Answers0