Prevent indexing of page clippings

Asked

Viewed 44 times

2

If you cut a page separating the head,nav, etc... and pull everything with include in the index.php, Google will index these cut pages?

I want to separate some parts by creating head.php and nav.php, then I will pull into the index making a include, but I need google to index my index BUT do not index the files head.php and nav.php as these will only be clippings to facilitate maintenance, this is possible?

Since if I give an index in the file head.php the search robots will not only stop indexing the head.php but they will also stop indexing my entire index because I will be pulling the file on it, how to proceed?

1 answer

2


Google "sees" and processes only what your server sends as a response, simply by clicking the right mouse button and clicking on the source (view page source for browsers in English) this is what google processes, although it can go a little further and identify/process DOM manipulations with javascript, for example tools like Selenium.

Anyway google and other search engines can not identify the internal processes of the server, only what it sends to the client side and the processes that occur on this side (in the browser).

Ex:

head php.

<!DOCTYPE html>
<html>
    <head>
        <title>SO PT</title>
    </head>

index php.

<?php include('head.php'); ?>
<body>
    <h1>Olá SO PT</h1>
</body>
</html>

The web crawlews from google here (index.php) will process/view only:

<!DOCTYPE html>
<html>
    <head>
        <title>SO PT</title>
    </head>
    <body>
        <h1>Olá SO PT</h1>
    </body>
</html>

You won’t know if head.php was "injected" into index.php via a include/require.

This way and to answer directly to your question, this way you have no way to charge the robots to see only a part of the page.

  • but google does a server search for files, in which case it can capture all public files on the server, even a scanner like Vega can capture those files, or am I wrong? so much so that even text files from which the site does not make any call google and some scanners can find good, that’s why I believe that they will also find clipped files like head.php and Nav.php for example

  • @Otaviofagundes, these softwares go by attempts and see if the server responds somehow in order to see if these exist. For example, http://migueldvl.com/nao_ver_conteudos , here it is necessary to go by attempts and to experiment if any url answers something, if they tried http://migueldvl.com/nao_ver_conteudos/ola.php , they would already find this file, BUT never (starting from the principle that everything is fine in terms of security) you will be able to see the contents of the file between the tags <?php ... ?>;.

  • This would be a huge mistake, because it would have access to sensitive information. For example: database configuration, server configuration etc... Anyway I do not think and I am 99% sure that google does not rely on this for indexing your site, even if somehow I can see that you have the head.php separate from index.php, this should not influence anything

Browser other questions tagged

You are not signed in. Login or sign up in order to post.