View Full Version : Creating Shopwindow sites which are search engine friendly - tips
Firstly, I'd like to congratulate AW on Shopwindow, as it is a fantastic product.
I've seen a few Shopwindow sites and they don't seem to be terribly search engine friendly. So I thought it might be a good idea to discuss how we can increase the chances of the pages being listed and ranking highly in Google et al.
One obvious example is search engine friendly URLs, which include the category and product names in URL. This has worked well for us with Amazon webservices etc. and I was wondering if it's possible to do this with Shopwindow?
Yes its possible. A few affiliates have implemented this, although everyone has used very different ways to do it.
It would involve a good knowledge of .htaccess Mod Rewrite and PHP though.
there may be a plan to implement it in the next release of shop window by default
Azam/Andy
What would you consider a decent SEO% score? 60,70,80% or should it be in the 90's to be competitive. Excuse me if I just answered my own question but without to much work, what would you be happy with?
Jake
SEO scores shouldn't be seen as a hard and fast rule.
Where are you getting your score from?
domaintools.com do one based on whether or not things like alt tags are added etc. But at the end of the day, Alt tags do not a well optimised page make!
I use various things to create my own score.
I make sure every large image has a relevant alt tag.
Every page title is different containing as few stop words as poss.
I try to get my code: text ratio above 20% at least.
the whole site needs to be intuitively navigable, so put links to the homepage on every page.
good use of <b> and <em> tags works wonders.
Ensure you use <h1><h2><h3> tags properly (ie, only 1 <h1> tag per page make it very relevant)
there's a billion things to do to get good seo, and only trial and error on various keywords/phrases could get you any kind of decent results.
And then theres SEM, link profiles (Who you link to, who links to you and how) sitemaps etc.
I base my own score on how mcuh traffic i get.
Andy,
Yes it was domaintools.com.
Thanks for bringing me back down to Earth, I'll leave SEO alone and get on with what I know best (marketing). It's a minor miracle that I have a site up and running (thanks AWIN) in the first place, so I'll just get on with the job rather than spend my time on unprofitable distractions.
Jake.
Andy,
Yes it was domaintools.com.
Thanks for bringing me back down to Earth, I'll leave SEO alone and get on with what I know best (marketing). It's a minor miracle that I have a site up and running (thanks AWIN) in the first place, so I'll just get on with the job rather than spend my time on unprofitable distractions.
Jake.
Oh, no!!
Don't leave SEO alone. it's still very very important to any online marketing campaign. Just don't hold so much store by "SEO Scores"
I recommend joining a really good SEO forum and scouting about for ideas or even asking for some help. I use http://www.site-reference.com mainly.
The best advice I could give anyone is go back to basics and make sure everything is covered in your store. Get a beginners guide to seo and check the points off as you run through your store.
Back to the sef urls, anyone implemented the friendly urls by .htaccess alone?
I have been using a content management system "modx" and that does a great job of creating sef urls.
Any help would well help
Cheers
Simon
Being a bit new to this; can anyone point me towards how I can find out this for the domains that I have
thnaks
Jon
Jonno, it can be quite a complex thing to implement, and it also depends on what type of server you are running.
Try searching for .htaccess and sef or search engine friendly urls, you can quite easily stop you site from working by messing with the .htaccess file, but its easy to edit and put back to how it was before you messed with it.
ss
Hi All,
To us newbies this .htaccess is daunting. I have read a couple of sites, verified that my server does mod-rewrite but thats as far as I understood.
Has anyone actually installed SEF URLs successfully and wants to share with us what they did?
Thanks :D
Jonno, it can be quite a complex thing to implement, and it also depends on what type of server you are running.
Try searching for .htaccess and sef or search engine friendly urls, you can quite easily stop you site from working by messing with the .htaccess file, but its easy to edit and put back to how it was before you messed with it.
ss
Thanks for teh infomation, my Web Sites are hosted on an Apache Server, and I use PHP & MySQL a lot, where should I find the .htaccess file, should there be one in each web site directory???
Jon
Confuscius
01-08-07, 09:47
You will find the .htaccess file in the root of your publicly visible directory, say 'public_html'. If you are trying to access it via FTP some servers are configured to hide it but you should be able to view and edit it via your cPanel file manager.
Mod rewriting Shop Window requires a comprehensive knowledge of re-write rules, the complete structure of the Shop Window program and an understanding of php and the Smarty template methodology.
You will have to amend many of the supplied Shop Window files and find every place that creates links. In rewriting the links then you will also have to ensure that your rewrite rules do not clash with each other and you will have to sort out a logical structure and order for the rules.
Although I know how to approach this task, I have not attempted it as it is not for the faint hearted - I take my hat off to those that have!
My guess is that it took those who have been successful in this several days work to achieve but I am sure that somene will enlighten us.
Good luck!
Paul
The basic theory is this:
1) Change all your coded site links to be static:
So instead of:
http://www.shopwindow.com/category.php?c=173
use, for example:
http://www.shopwindow.com/category/173.html
(the exact format is up to you)
2) Create rewrite rules on your server using .htaccess and mod_rewrite. This will require a thorough understanding of .htaccess, mod_rewrite and regular expressions.
What happens then is this:
1) A user requests the following page by clicking on a link on your site or from a search engine result:
http://www.shopwindow.com/category/173.html
Now obviously this page doesn't exist as a file on your webserver but...
2) Before serving the page your webserver checks your .htaccess file to see if there are instructions on how to handle this request.
3) You will have a rewrite rule that will contains a regular expression that matches URL requests of the format: http://www.shopwindow.com/category/nnn.html
where "nnn" is any number.
4) Your rewrite rule then tells your webserver that instead of serving the requested page it should serve a page called:
http://www.shopwindow.com/category.php?c=nnn
Therefore your PHP gets the query string but your "visible" links appear static.
THE IMPORTANT BIT
There are a lot of things that can go wrong when implementing this. You will need to plan your links carefully so that there is no confusion for your webserver about which page to serve. A confused webserver is not a good thing.
I believe that URL rewriting is considerably easier to plan and implement when writing a site from scratch as you have full control over your code and URL design. If you're not able to code a site from scratch (at least in theory, whether you do or not is up to you) then URL rewriting is going to prove extremely difficult. Sorry if that sounds blunt.
My re-write rules for my cms are
# Rewrite directives here for SEF (Search Engine Friendly) URLs
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# If your MODx installation is in a subdirectory, change the following line to match the physical
# path to the "root" of the site as follows:
# RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]
RewriteEngine On
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
RewriteEngine on
RewriteRule ^index\.htm$ / [R=301,L,NC]
RewriteRule ^index\.html$ / [R=301,L,NC]
So I'm thinking one of the lines
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Could be added to with
RewriteRule ^(.*)$ product.php?p=$1 [L,QSA]
But a product detail page in shopwindow has
product.php?p=13531440&c=187
It has C=187 this must be the category, don't know how to add this
If someone has implemented this is it possble to either post the code or a small tutorial i am sure a whole lot of people will be gratefull to for this.
Jaded Studio
16-09-08, 09:27
I have a long winded way of doing things!
First off open category_tree.tpl in your template/elements folder
find the following line (approx line 12):
<a href="{$oCategory->sLink}">
replace with:
<a href="{$P_INDEX|replace:"index.php":"category/"}{$oCategory->sName|replace:"&":""|replace:",":""|replace:" ":" "|replace:" ":" "|replace:" ":"-"}/">
This replaces some characters and spaces, and basically changes this:
http://www.mydomain.com/category.php?rb=4-281
to this:
http://www.mydomain.com/category/Finance/
Now create rewrite rules like this in .htaccess:
RewriteRule ^category/Finance /productlist.php?rb=4-281 [QSA,L]
This will only change top-level links in your category tree, and a big downside is you have to add all of your links to be re-written into .htaccess. The above example only rewrites the link for Finance. On th upside, you don't have to modify any core SW files, as the only file modified is the template file. Therefore if you upgrade or re-install in the future, your code won't break.
Hope this helps
Dave
Jaded Studio
17-09-08, 16:11
After looking into the SW structure, it seems that 'pretty' URL's are achievable without .htaccess.
If you look into class.shopcore.php around line 124, it looks as though the file is looking to see what has been requested, and serving the correct content based on that.
I was thinking use PHP to change all your links to pretty ones. Once the links are taken care of, edit class.shopcore.php and use $_GET to retrieve the pretty names. Once they have been retrieved, assign them to the correct content. I'm sure all of this is possible, but I have neither the time nor skills required to do this.
Would be good to know if this would work.
Hi Dave
Did you have any joy with this?
I tried your example in your previous post but could'nt get the urls to parse, think it may be connected to the additional forward slashes in your code example above.
I did have V1 running with non keyword URLS but need to relearn how i did that to port it over to V2, although the ideal scenario would be keyword URLS.
Jaded Studio
25-10-08, 14:53
Hi Ash,
I've set up a test area at http://www.sweethamper.com
As you can see all of my URL's in the sidebar are keyword friendly, I have setup the .htaccess rules for category 4, Electronics and this seems to work fine. Not sure why your installation isn't working the same.
Looking further into the whole thing, it seems that sub categories and sub sub categories are a little more complicated, but so long as you have your .htaccess rules written in the correct order, everything should function correctly.
I haven't worked on this for a while as busy with other projects, but when I come to look at it again I'll be sure to post any progress.
Dave