Printer Friendly Version
Email this thread to a friend
|
php update question (In: Coding & Databases - PHP, ASP, Perl, etc.)
Featured Web Site Template |
|
There are 0 guests and 1 members in the forums right now.
Reflects user activity within the last 5 minutes
|
|
| Member |
Message |
RenKen
Joined: Apr 01, 1999
# Posts: 560
|
Posted: 2005-Sep-27 22:37
I am optimizing my PHP pages using the title in the query string, because my pages don't have a HEAD tag, there's no way to optimize the TITLE tags of each page.
www.site.com/main.php?pid=overview&title=health%20care%20medical%20advertising%20and%20marketing
Is there a better way?
|
 |
g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465
|
Posted: 2005-Sep-27 23:27
You need to rewrite your script.
The output of your script needs to be a valid HTML document.
It needs to have <html> and <head> and <body> tags.
It needs to have the correct information in the <head> including <title> and meta description.
If your script does not output HTML code in that format, then your website is broken and in need of repair.
|
 |
RenKen
Joined: Apr 01, 1999
# Posts: 560
|
Posted: 2005-Sep-28 01:37
The output of the script is a valid HTML document, I meant that each page has the same HEAD tag. So, in order to put separate titles on every page I've used the query string.
Do you know of a good online guide for this? I'm sure there has to be a better way.
|
 |
RenKen
Joined: Apr 01, 1999
# Posts: 560
|
Posted: 2005-Sep-28 01:38
Or even a good book on optimizing for PHP?
|
 |
RenKen
Joined: Apr 01, 1999
# Posts: 560
|
Posted: 2005-Sep-28 01:42
I used this guide when I designed my site:
http://www.stargeek.com/php-seo.php, but I'm thinking there is a better way.
|
 |
RenKen
Joined: Apr 01, 1999
# Posts: 560
|
Posted: 2005-Sep-28 01:55
Oh NO! I think I'm getting what you're saying. But now, if my site is programmed with the .php pages, I'm not creating a .html page out of the PHP, then if I have to switch back to the .html pages, that means I lose ranks all over again!
But, what you're saying is I should be creating a .html page out of the PHP?
I just had a long conversation with our programmer, he says that we can't create an .html page - that we are creating an HTML output. I guess that's what you were saying.
We talked about creating the meta tags out of a database. Would that work? Anyone have any experience with this? I'm looking for the best way. We've never attempted this before.
How do you create the metatags for each individual page? I'm going to read the rest of this forum.
[ Message was edited by: RenKen 09/28/2005 07:07 am ]
|
 |
Dinkar
Staff
Joined: Aug 12, 2001
# Posts: 4391
|
Posted: 2005-Sep-29 10:52
RenKen, you can use your pid value for showing related title.
Create one text file for each pid value and put the related title in that file.
For eg:-
Create overview.txt file and save "health care medical advertising and marketing" text in that file.
Now edit your script to show the content of overview.txt file as your page title, when pid = overview
So your new URL will be like this: www.site.com/main.php?pid=overview
HTH.
|
 |
RenKen
Joined: Apr 01, 1999
# Posts: 560
|
Posted: 2005-Sep-30 15:41
Thanks, I may try that.
Here is another good explanation of the situation:
http://www.highrankings.com/issue149.htm#seo
|
 |
lizardz
Joined: Nov 12, 2004
# Posts: 1394
|
Posted: 2005-Sep-30 21:32
This question completely depends on the skill level of the programmer who is doing this job.
Normally, with a large dynamic site, you'd have a database that contained descriptions of the page, title text, header text, and so on, or you'd use existing data tweaked slightly to generate the tag content, meta description, title, etc.
Or you can use simple flat file methods, my favorite is simply using arrays that contain the desired data, it's easy to work with, easy to setup, and for smaller sites takes much less time and energy to get working than database stuff, all depends on what's producing the page code in the first place of course.
One thing you do not want to be doing is generating urls with those kinds of spammy links though, it's much better to keep it clean and simple, you get very little seo benefit from file names, you get a whole lot from title tags.
|
 |
RenKen
Joined: Apr 01, 1999
# Posts: 560
|
Posted: 2005-Oct-01 17:40
lizards, I'm glad you joined this conversation, I saw some of your other posts and you seem to know what you're talking about.
The problem in our shop is that we do have two very smart programmers, but we have a lot of projects going on and so they are always swamped with work. I'm not really a programmer, but I have to manage these projects and make sure we're doing things right, especially in terms of SEO. I do some of the programming myself, but not much, my skill level at PHP is about a 2 on a scale of 1-10. I know enough to be dangerous.
Anyway, I started to look at our positions in google for the keywords that I optimized for. It seems that the way we're doing it is working just fine - using the title in the query string. I was mainly concerned when I saw in a few other threads a discussion of HTML output. But, after reading more on it, I don't think that's an issue I need to be concerned with - because our pages are formed correctly.
I think that Jill (the link I provided above) was right in her explanation, that in the old days, we may have needed to produce the actual HTML pages with the .html extension, but search engines have become more able to index pages with the query strings, so perhaps it's no longer a problem.
Can you describe the arrays thing a little more? That sounds interesting to me.
|
 |
lizardz
Joined: Nov 12, 2004
# Posts: 1394
|
Posted: 2005-Oct-02 03:26
First off, I can tell you this without any doubt, I've experimented with page + query string versus mod_rewritten pages no query string + title, and a unique url + unique title outranks single url + query string by a factor of several hundred times by my guess.
I've been testing this on a gallery script I do, I used to use page + query string, not only did google not really index the pages at all, they were all listed as supplemental results, but all the query string pages did not rank worth anything.
Once I switched them to mod_rewritten pages, they were all immediately indexed as unique pages, without me changing anything at all. I don't care what anyone says about search engines being able to read and follow query strings fine, they do, but the seo benefits are poor to horrible from what I've seen.
Recently, I started experimenting with adding some more seo useful title tags to these pages, and with each addition, the pages with these optimized title tags, drawn from an array of data, immediately ranked top 10, often 1,2, 3, for search terms with between 1 and 5 million results. Not only that, these tweaks brought the whole site up for the general category I'm optimizing for.
If SEO is the question, then unique urls are the answer, ignore what search engines may say about this, that's a fact as far as I'm concerned. Luckily, most people don't do this.
Array based stuff is very easy to do, but has a top end practical limit of probably 100 separate pages, you can do more, but it gets to be a pain, and at that point you should probably do db stuff for long term ease of maintainance, but it's so easy to create decent pages with array data, aka flat file dbs.
There are different ways to do this, one is this, assuming static page content id numbers:
$a_page_data = array(
123 => 'title one',
124 => 'title two',
125 => 'title three',
126 => 'title four'
);
and so on.
Then you just write a function/s to extract the content page number id, and write out the title with something like:
<title><?php echo $a_page_data[$page_id]; ?></title>
That's the general idea, very simplified, using dbs wouldn't be any different, except you'd be grabbing the correct db index and getting the title info for that. You can extend this easily to support unique meta description data too, it's all the same.
Sounds like your programmers are overworked, the solution they are using is simply the absolutely most simple, quick and dirty one available, there's nothing good about it except it sort of works, in a crude basic way, but if SEO is the question, all you have is a bunch of really bad urls with very poor seo value, that you're going to have to rewrite anyway to standard forms if you ever want this stuff to start performing re seo and search engine referral traffic.
|
 |
RenKen
Joined: Apr 01, 1999
# Posts: 560
|
Posted: 2005-Oct-03 15:44
Thank you so much! This is what I thought from the beginning of my post, here. This is exactly what I wanted to know. I will try this out.
|
 |
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you cannot find this message, click here to Re-Send it.
|
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.
|
Switch to Advanced Editor and ...
Create a New Topic
or Reply to this Thread
|
|