View Full Version : ASP Include Files
jogrady
10-21-2004, 11:42 PM
I'm constantly hearing that using ASP or PHP will hurt you on organic search. I could understand this to be this case if dynamic links and content were being used, but in my case I just want to use include header and footer files. My question: To what extent can you use ASP and PHP and not be penalized?
mcanerin
10-22-2004, 12:02 AM
Hmmm - I think penalized is a bit overstated...
Here is my understanding on how this works:
There is absolutely no problem with the extension (asp, php, jsp etc) - it does not automatically give you problems. Many of the top sites use them.
However, the major bot's have 2 issues that CAN cause problems with your rankings.
First, when they know they are on a dynamic site they often slow down and not hit it as fast or as deep, out of a concern for the server response time (not everyone is running dual Xeon webservers) This can affect how deep your site gets crawled and over what timeline - which can be subtantial if you have a low PR. Imagine not getting your pages all indexed for 9 months, rather than 2. This can affect your rankings during that 7 month difference simply due to the "pages not being there" and the internal links not being counted. Those numbers are examples only, of course.
Second, if you have a database driven system with (to use an extreme example) only one record in it, there may be hundreds of ways to get at the record - each with it's own URL. Obviously a spider would want to avoid this, and they approach sites like this with some hesitation - typically the more qualifiers (items after the "?") the more likely you are to be showing different paths to the same records - most SEO's recommend no more than 3 qualifiers.
Now, numerous examples of long dynamic URLs exist, so it's not hard and fast, but that's the reason many people recommend using mod_rewrite to make the URLs appear static - the bot comes in faster, and proceeds more confidently, so you get indexed faster and more thoroughly.
Of course, if you are already fully indexed, this isn't a problem :)
Ian
jogrady
10-22-2004, 12:37 AM
Ian,
Thanks for the reply. Based on what you said it does not sound like the include file will hurt me. My site is about 20 pages and does not have any dynamic content, so do you think indexing would be an issue? I am also curious about rewritable urls. Do you know of any good resources to learn more about it?
Thanks again for all your help. I'm new to this board, but look forward to finding ways I can contribute back.
Thanks,
John
mcanerin
10-22-2004, 02:04 AM
You should be fine with the include files, and 20 pages should be no problem at all :)
The Mod_rewrite only helps IF you are running on Apache and IF you have access to your .htaccess file, but if you do:
Here is the "official" information on it:
http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html
but for SEO purposes I recommend:
http://www.stargeek.com/php-seo.php
And our very own Dirk from Fantomaster wrote:
http://www.fantomaster.com/faarticles/rewritingurls.txt
BUT if you run IIS like me, you can achieve the equivalent with:
http://www.qwerksoft.com/products/iisrewrite/
Hope that helps. In your case you probably don't need to, but you may find this stuff interesting anyway :)
Ian
Marcia
10-22-2004, 02:32 AM
How about if there are no special characters in the URL - just page.aspx or page.php
Will those set off an alert that the site is dynamic, even if it's not and is set up the same way as though the pages were page.htm
I've never thought of getting into .net but there's a host I'd like to try, as well as fooling with isapi_rewrite and I was just today wondering about straight non-dynamic .aspx pages
mcanerin
10-22-2004, 03:06 AM
Yes and no - but mostly no :)
In general, the bots will hit a .asp, .jsp, etc page with no qualifiers just as fast as if they were normal .html pages, BUT if the response is slow, they begin to throttle way back. So if you have a fast server, no problem, in my experience.
I do know that some people claim that it even slows down here, but I've personally not seen it to be the case - most directories have no issues, for example.
BTW, this is also an issue with .htm pages that are on a really slow server - the page gets marked as "unresponsive" and the crawl slows down to a .... crawl.
So you could have a static html page being treated using the "slow" rules and a dynamic .php page being visited using the "normal" mode, even though a lot of the time it's reversed.
And very bad things happen if a bot visits your site repeatedly and finds it unresponsive :( It's normal for a site to be down or slow sometimes (ie backups, etc) but if a bot visits several times according to its rules and gets an unresponsive page each time, it will either stop coming or slow way down.
I'd like to think the opposite is also true - that it will speed up on dynamic sites if it gets fast responses. I remember someone telling me that was the case, but I'm not sure about it so take that with a grain of salt. It would make sense though.
Sometimes people ask if your host affects your rankings - for most people the answer is no, but sometimes things like this can change that answer to a yes.
Cheers,
Ian
DaveN
10-22-2004, 05:49 AM
jogrady : I just want to use include header and footer files
I think if i have read you post correctly all you really wanted to know is if you have an asp page and you include a header and footer would it hurt your site..
The answer is NO it would not...
an asp include is Server Side, so that even the best seo - spider - guru - fast food work would never be able to tell...
if use asp
<!-- #include file ="headers\header.asp" -->
it is better to use an ASP extension. The source in an ASP file will not be visible after the server has interpreted it.
DaveN
dbmasters
10-22-2004, 06:21 AM
Includes pose no threat or problem at all with bots. As I understand it, the bot reads a file as a visitor sees it, just do a view > source on your browser, that is what the bot sees, it doesn't know or care that some of the content is from an include file or not.
If I am wrong correct me, but that seems to be the case.
Also, a site I run that is completely dynamic (PHP/MySQL) has up to 3 querystrings on many deep URLS, has been crawled very deeply and indexed well and is appearing on the top 10 in most search engines for very competitive keywords, so obviously, as stated above, the dynamic URL thing is sometimes a problem, and apparantly, sometimes not :)
merlinti
11-09-2004, 07:38 PM
What about if a search engine finds your include file and you have a redirect in it so that you can't see it without it's parent page including it.
Is there a penalty for that?
thanks,
mcanerin
11-09-2004, 09:01 PM
An include file is simply a way to make a webpage (or part of one). It happens on the server before it's ever served to the browser (or the search engine).
Assuming that you don't have a slow server or technical issues, it's completely indistinguishable from a static HTML page to anyone outside of the server. What you see when you do a view source after the page loads is what you get. Nothing more and nothing less.
Which means that if you put anything in an include that would help or hurt you in a static page, it will help or hurt you in the dynamic one to the exact same degree.
It's completely visible to everyone. The only "hidden" part of it would be any code that was executed on the server before being sent, which is true of ALL dynamic pages, not just includes.
Ian
merlinti
11-09-2004, 10:50 PM
I built a php website using a switch statement to include files like : "index.php?page=home" . This will include the "home.php" page into the index.php page. Also it will include the meta tags and title for that page depending on what "page" is equal to. the home.php file contains a table and some content. At the top of the page, I have this code so that the include pages can't be shown by itself:
<?
if (!$main){
header ("Location: index.php?page=home");
}
?>
In the index.php file at the top I have this:
<?
$main = 1;
?>
Is this example ok with search engines?
thanks