View Full Version : PHP mySQL SEO
dave2007
10-17-2007, 06:35 AM
Hi Folks,
Im a little new to the SEO game, but now that im about to embark on a personal project, i'd like to make sure i do this right from the start.
My understanding on SEO knowledge is a little vague when it comes to understanding how the SE works.
If I build a site that is very php/mySQL heavy, that is to say, most content is pulled dynamically, so i have many .php files sitting on the server, how does this effect the SE when it comes to crawling my site?
If many of the key words are in the database, and get pulled when the page is hit, does this matter to the SE, and if it does, what is the best work around? Should i be trying to create static pages out of my dynamic content?
Also, in order to keep the content 'fresh' how does the search engine recognize this, if only the content in the db changes?
Many thanks in advanced folks
Jazajay
10-17-2007, 10:08 AM
Hi Dave
First off PHP code only needs a few changes it's not a major issue. PHP is parsed before the SE sees it. Look at your source code and thats what the SE sees.
We'll start off at the top.
1. The address bar/your url - if you have a url like this
example/cat/product.php?var=1&var=2&var=3&var=4
It would be better to change this via mod_rewrite and 301 it to some thing that just has keywords in keep it short.
For example rewrite it to -
example/cat/productName.htm
the .htm is no different to search engines than .php but I think it looks nicer. Plus side if some one tries to hack your site it would mean that they have to go and check out the headers directly. Just added annoyances to any hackers. Yes slight but the more you can annoy them the higher chance they will give up and not even test your defensive code. I take it you clean your code?*******
2. You need unquie title tags and meta description, You can forget about any other metas, Keywords maybe for Yahoo and MSN but it's really a waste of time in my opinion.
The way I do this is by adding an extra 2 rows to the product table and writing them in by hand when I add a product to the DB. THIS IS A MUST-Meta description is for SE SERP's only and has very little to no SEO effect. But you should include it. Title should just be your keyword maybe one or 2 words your keyword density here does help. So
page title = "Widgets" =100% keyword denisity
page title = "domainName.com - Widgets" = a lot less lol. This also would give you dup.content. DO NOT ADD DOMAIN NAME IN TITLE.
********
3. Page topography(hope thats the right word) You want a h1 tag near the top with all your good content-Google can find your content anywhere on the page but I just think it's good practice to have the SE index your content first and then all the crap second. Nav bars etc.. Just the way I do it very little to No SEO value.
4.Use a page template and place your content in the same place on every page. As in content first (if you want this wont increase your rank though so it doesn't matter)then left and right nav's footer etc... SE look for page structure and try to add less relevance to navs etc.. Again little to none SEO value.
5.Place keywords in Bold,lists,Hx tags. This sets it out from the rest. Get your keyword density up to around 5% don't worry if it's only 2% or 7% as it again is not much of a factor to Google, but Yahoo and MSN still use it to a degree. Only place keywords in bold,lists etc.. if it make sense to your design, if it doesn't forget about it. Use Hx tags sparingly and only 1 H1 tag.
Concentrate on only 1 or 2 keywords per page.
H1 tag is a must but the others, to Google have little value. If any. It used to but I don't think any one could point an example out where 2 sites rank exactly the same and a bold keyword, or a keyword in the list was the main reason why one site was ranked higher, I suppose the same could be said about the H1 tag. No one can pull an exact example. I don't mean a answer from Matt ethier I'm always skeptical about what Matt says. I don't always immediately say how high when Matt says jump.
6. Content freshness needs to be regular an update at least once or twice a month minimum depending on your subject that is. Don't do it the same time every day/week/month as spiders tend to hit your site only at those times then.
7.Sessions can cause serious issues remember SE don't use cookies. The only way around this is either don't use them or to cloak. As in detect if a SE is hitting your site and turn sessions off. However if you get caught you will be up a poop stream with no paddle as SE don't like it and they will penalise you. *****
8.submit a dynamic SE site map, this can be done via PHP, to Google and Yahoo when you update your content.****
9.Add a static site map page this will help SE get to all your content.
10. If you have similar pages remove one with robots.txt, rel="nofollow" added to a link or use meta exclusion tag in the header.****
11.Create an RSS feed and submit them to article directories*****
12.This is the daddy get links from sites that have similar content back to all/your main pages. I would say 80% one way, as they link to you only, and only 20% reciprical, as in you link to them and they link to you.
13.Block pages like Contact us/about us/shopping cart/other useless pages via Robots.txt as these are useless to SE.****
14.Read searchenginewatch often lol
15. Static pages help but doing mod_rewrite is just as good.
As you can tell on page factors are a lot less of an issue concentrate on relevant links. But get the on page done as well.
There are other factors but they would be the main ones to get right when first designing a new site. I'll PM you the title of a must read book for PHP sites.
Hope this essay helps
Take care
Jaza
**** = issues for dynamic sites.
dave2007
10-17-2007, 10:25 AM
hey jay,
I'll be sure to check this site out often.
Its a big project so will be a while before i start developing anything, but if i know what i need to be aware of now, it will help create/shape the site.
Much appreciate.
Thanks
SanDiegoSEO
10-17-2007, 01:54 PM
Dynamic websites are so much easier to optimize then large static sites. You can set up the script files to pull elements such as product names or category names and dynamically insert them into on page elements to increase keyword support.
And remember, the spider doesnt see your site on the server, it sees the files as the server would be serving them to a user. So view the code in a browser, check the source code, and you'll see exactly how the spider sees it.
whitehat
10-18-2007, 02:33 PM
Some nice advice there Jay
however page title = "domainName.com - Widgets" = a lot less lol. This also would give you dup.content. DO NOT ADD DOMAIN NAME IN TITLE.
Since when does having your domain name in the page title give you duplicate content issues?
Surely half of the amateur sites on the web would be blacklisted if that was the case?
Jazajay
10-18-2007, 02:59 PM
The title is one of the only on page factors you really need to worry about. And that can still be proven to have any effect on rankings. It tells the SE's about that pages content.
Now say you have 1000 pages all with domain-name in the title. You are telling Google that the content on those's pages all have something to do with domain name when they don't.
Titles should only contain the one keyword you want to use for that page in SEO eyes titles should = 100%, usability eyes this is slightly flawed. Titles show up in the SERP's and a good title will improve CTR which can be more important it's all about balance.
I would rather have a site thats 6 in the results but converts 30% of the time. why?
The average conversion rate for a website is 6%, 1.2% for ecommerce. So even though I was 6 getting less traffic I would convert a lot more and make a hell of a lot more money than having aggressive SEO and being ranked 1st and having a conversion rate of 1.2%.
The other reason is it dilutes your page title relavance. The page title should be 100% the keyword for that page so Blue widgets would equal 100% however as always their has to be a tradeoff, just sods law, so the title could be
blue widgets-from £2
This dilutes it by adding -from £2 but from a conversion point of view this is a lot better.
Now lets add the domain name
domainName - blue widgets-from £2.
This is now really diluted and is a big mistake.
However should you always not use the domain name?
No there are exceptions.
Say you sell blue widgets and your domain name is widgets.com
it would be alright in this situation to include widgets - blue widgets-from £2
Because one of the keywords you are trying to hit is widgets and this would help increase the relavance.
However this does not mean it needs to be used on ever page sticking with widgets.com
Now say if they also sold purple flowers (a strech but you know what I mean) It would not be alright to include widgets - purple flowers from £2.
As widget is nothing to do with that page.
Jazajay
10-18-2007, 03:00 PM
Also how many ameter sites rank in the top ten?
whitehat
10-18-2007, 07:07 PM
Jazajay
re/ the title thing you are talking about.
I agree titles are critical.But including your site name in your homepage , such as * great blue widgets from googlegrub* is not an issue in my eyes.
Maybe some of the old timers can chime in here about this. but I think you are wrong....
Example one
ebay.co.uk/
ebuyer.com/
the list goes on.
Ebuyer has had their name in the title since I can remember (and I knew the site when it was young)
amazon.com/
And the list goes on ;)
Jazajay
10-18-2007, 08:54 PM
Yeah but sites like ebay don't need SEO and even if they did the main keyword is ebay or amazon as thats what people type in to get to them. they just type in ebay.com or one of the other 60 domains they have.
If I want a book I wont go to Google and type in book I'll either type in amazon.co.uk or use a9 search or go though an affiliate that has caught my eye. If I want to go to ebay I wont type in auctions or auction site in Google I will type in ebay.co.uk
Secondly ebay makes 33billion a year. They are in almost every country. The amount of SE traffic they get is minimal compared to word of mouth. My nan who's 60 has a Paypal account and a Ebay account, she didn't go their via the SE she got it off TV and her freinds. Hell my nan uses the address bar to search. She didn't even no you could go to Google directly.
Thirdly my son who's 2 and a half says ebay. He cant string sentences together properly but can say ebay mainly as my other half is a power seller. Look at ebays URL structure and you will see how bad it is. ebays internal search engine had over 2.5 billion search's last year alone.
Amazon's another one. Again how much traffic do you think they generate from the SE very little.
Why?
They have A9 search straight from the tool bar they have thousands upon thousands of affiliates, who will generate them more traffic than the SE and they are again a household name. They have 58 000 books alone. My nan has heard of them as well and she hardly uses the net.
Do you know that on average when some one new to the internet gets online amazon will be one of their first 30 sites they visit, ebays in the top 5. That was from last year granted but I don't think it has drastically changed some how.
These kind of sites spend millions a month on adsense and PPC.
ebays just launched they own adsense which have items ending soon. This will generate more traffic than the search engines give them as well as a lot of impulse buying which in turn will mean people will sell stuff more often as they are getting higher prices, which will in turn bring in more traffic then generated by the search engines. My missis just sold a baby chair for a penny RRP-£15, we lost money and they are paying cash on collection but hay do you think the next time that person wants baby stuff they are going to go to the search engine no they will go to ebay as I mean a penny what a bargin. Yes I laughed as well my missis said stuff I might get a warning if I post.
The end of the day household names don't care about the organics which generate them little traffic in comprasson.
If Google and the others de-indexed both of these sites do you think they would go under? Even dent their profit margins much? no. As direct SE traffic plays little to them and what they get is mainly PPC anyway.
So to them the page title is useless. Check out the source code of some of the auction sites. Due to the fact people can edit it and ebays own code doesn't help, SE would simple choke.
The pages that have PR and a lot do, do because SEO's now how to play it by linking from the outside. SEO's/SEM's do do ebay and a lot are power sellers. The pages that do get ranked well in the organics will do as SEO's will be behind them.
Think of it like this ebay sells everything from barbi dolls to dildos. If they did a massive SEO job they would simple rank for everything. I mean everything. You type in php and you would get php books from ebay as one of the top results. how about car history ebay would be one of the first results as it would be selling a book on car history. Due to it's redicuilous size, trust factor and large amount of links it holds plus it's optimized page titles sorry had to get that in, Imagine ebay buying links on a large scale it would go though the roof. A million pounds 2 million, thats 3-4 million dollars a month alone on link building, The thousands of power sellers linking from their sites to get their items ranked better. What would be the point in any other site if they cared about the organics?
Jazajay
10-18-2007, 09:23 PM
Also the main reason the page title has the domain in is due to the time when they where built and how to get ranked well 97-98 time this was the time before they grew beyond SEO and actually needed it. This was also the time that little was know.
For example people thought if you got links you would rank for everything then it moved on to the coolness factor
People thought if their site looked good it would rank well at one point so millions was spent on nice looking sites that where worthless.
It was then comminity if your site had lots of places where people could chat it would rank well
Then it moved on to the main reason content and relavance.
Secondly I just bought a usability book from 2002/2003 in it, it says put the domain name in all the pages and criticized sites that didn't. Thats only four years ago. I've brought 2 SEO books one from the end of last year thats already showing it's age and one from march of this year that say the opposite. Plus also the forums, emails, and blogs I read as well.
Thirdly if ebay or amazon was interested in SEO they could just employee thousands of the top dogs around, I'm waiting egerly for the call :), pay them huge pay packets a year and have these thousands of SEM's look for as many links as they could.
It would get to the point where the SE would have to filter the results of these site to return any decent results.
Ebays PPC make me laugh they have PPC for everything regardless if they have it or not. The other day I was searching for mysqli help ebay PPC popped up. So curiously I clicked it, it took me to a ebay search that returned no results.
O yeah just again my missis sold a baby chair on ebay for 1p, about 1.2 cents, and they are paying cash on collection :D
whitehat
10-18-2007, 09:28 PM
Lots of stuff
Interesting analogy.
But again, I disagree.
ebay DID used to use ppc heavily until they fell out with Google and they pulled their PPC adverts on principle. (obviously they werent too bothered as organic search gives them more traffic i would guess)
If Ebay were to be deslisted from all the Search Engines it would make a massive impact to their profits.
not that it will ever happen though....
At the end of the day. I dont have time to write essays on it. but you are WRONG about duplicate content penalties being applied if a site uses its name in a title.
These examples are big, but not ebay big. and prove the point...
http://www.jobsite.co.uk/
http://www.monster.co.uk/
the list goes on.
At the end of the day. Please prove your claim !
whitehat
10-18-2007, 09:45 PM
and again.
Having sitename in the title does not constitute dupicate content or incur a penalty.
end of
Jazajay
10-18-2007, 10:33 PM
Please find below several links to similar content/ideas on this subject if you would like some more I can point you to a good tool (http://www.google.com) for this sort of work.
It's pretty easy to use. On the page there is an input box places the search term in it press search and it'll look through it's database for you. The words I used was -
placing your domain name in the page title.
Some excerpts are provided from the descriptions as I couldn't be arsed to trawl though pages for you.
link1 (http://forums.seochat.com/showpost.php?p=473742&postcount=11)
link2 (http://forums.seochat.com/search-engine-optimization-28/title-tag-optimization-tips-93036.html?p=360237#post360237)
Blog post from 2003 none the less. (http://tools.devshed.com/c/a/Search-Engine-Tricks/Search-engine-Optimization-Guide/)Don't even think about having a title page like PAGE 1, Joe's home page, My home page or any other title that's not very descriptive because it wont help you one bit.
link4 (www.3fn.net/guide/Is_Your_Domain_Name_Broken.html)
- your domain name and page title must be the ... high scoring key words
link5 (www.how-to-make-money-online.info/Optimise_your_site.php)
-If your domain name has good keywords then repeat these keywords in the title of your page
I would like to finish it off with a quote from a quote from J.Sirovich
"One if the biggest mistakes people make is to set the titles for the pages on the web site to generic text frequently the company name..." - dupicate content.
Jazajay
10-18-2007, 10:34 PM
I'm going to sign off from this thread now as I think the point has been made.
whitehat
10-19-2007, 05:44 AM
I'm going to sign off from this thread now as I think the point has been made.
Indeed. Your point is misguided and wrong.
Duplicate content is not the issue here. It would only be like repeating 'dog' on each page of the site for a site about dog grooming products. NOT DUPLICATE CONTENT ;)