Jump to content

[SOLVED] PHP, forms and search engine optimization


Recommended Posts

OK.  Here's my setup.  I want to see what changes I need to make in order to help with search engine optimization.  First of all, my first main page that does anything is index.php.  Now, I know by default, pages get directed to index.html, right?  So, to get it to index.php, I'm assuming that I have to do something similar to this in order to bypass user interaction:

<meta http-equiv="refresh" content="0;URL=http://www.blahblah.com/index.php">


So, my first question is how does this affect search engines?  Because index.html is technically the first page, but it doesn't have anything in it that search engines look for other than maybe an appropriate TITLE and a META description tag, right?

Then my second question is regarding the index.php page.  On this page, we have a simple form verifying whether or not the user has read our EULA.  How does having this simple form affect spiders crawling my site?  Will they be able to read through it and then crawl the rest of my site?  Thanks in advance!
Oops.  A quick edit.  Actually, index.php isn't the main page.  Even this page does a redirect.  It checks to see if the EULA cookie has been set.  If so, then it sends the user to the main page.  If it hasn't been set, then it sends them to the disclaimer page.
It looks like you are doing everything in your power to prevent the spiders from indexing all you site that this could be a chapter entitled Don't Do...

html redirects are one of the things that cause a few spiders to immediately leave your site and not bother indexing anything. I suggest you take a fresh look at how you can change your site so that redirects are nor required. If your server configuration allows it (most do) simply delete your index.html / index.htm file and the index.php (or index.asp etc.) will be served by default.

There are other issues in there like how a bot carries on from a form etc etc. but somethings you just can't avoid. Perhaps your site would benefit if there was more information pages that can be viewed prior to the client having to agree to the eula; that way you could guarantee more opportunity for crawlers to index the site.

I am positive others will have better an more helpful comments to make...
Hmmmm... That's exactly what I was worried about.  I'm thinking about gutting all that stuff, and instead just adding a disclaimer to the copyright section mentioning the same stuff but without requiring user interaction.  Now, suppose I want the user to go to aboutus.php by default (this page has the most amount of informational text which is what I'm guessing the search engines are looking for), can I set this on my server, or will it be looking for index.php?
unless you have access to the apache config yourself OR the server allows you to alter settings using a htaccess file (all this assuming you have apache of course) then you can select which page shoudl be served by default.

Hot hot on apache stuff but if you do have either option open to you then I believe the command you'd use is:

DirectoryIndex aboutus.php
Yup.  Running Linux and Apache, and I have access to the server so I should be able to make that change.  And as for the "user experience" and as far as spiders are concerned, setting the default page to aboutus.php doesn't matter, right?  This is stuff done on the server side, so it really shouldn't affect anyone for anything, correct?
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.