Hello Members, Suppose that my website is in PHP. I have define footer section in .inc file and include it in the pages as well. My question is that search engine crawl the links which is define in .inc file or not. Thanks, Omie
Unless you have specifically linked to this file, then no. If you're using PHP's include() function to include the footer.inc file then this will be handled server side. The search crawler won't even know its in another file.
It doesn't depend if you have footer content in inc file or not, it depends how you add footer inc file. if you are adding it in server side code then it is crawlable. see the cached file from google to know the result.
What do you see when you navigate straight to it? Try www.example.com/footer.inc My guess, given your question, is that it is web accessible and represents a potential security risk - even more so if it is an .inc file and not .php. This, of course, depends on your server configuration.
It won't be crawlable if: It is not directly linked to in the HTML output. The code is written to OUTPUT HTML code. The .inc file is outside of the Web directory (usually /root/ or /html_public/ or /www/). Of course, these are all best practices to be using in the first place.
Any file in a web accessible folder on the server can be accessed, unless the server is correctly configured. footer.inc will probably be served as a text file. Worst case? footer.inc has a line like <?php require(db_functions.inc); ?> Now we go to example.com/db_functions.inc where we find a text version containing username and passwords to the database - probably as root user no less! footer.php would be more likely to be parsed before being served.
Which, as I said (without directly saying it), is why the files need to be placed outside of the Web directory.