IBM Software Group Search Engine Optimization for a WebSphere Commerce System Shash Anand (sanand@ca.ibm.com) Aileen Guan (aguan@ca.ibm.com) WebSphere Support Technical Exchange
Agenda Overview General SEO WebSphere Commerce Specific SEO Demo WebSphere Commerce URL Mapping and Site Map Exercise Third Party Search Engine Optimization Tools Limitations Summary Reference Q&A WebSphere Support Technical Exchange 2
General SEO What is SEO? Search Engine Optimization Ensuring your site is search friendly which allows spiders to visit and index the content on the site Ensuring your pages include the keyword phrases actually used by searchers Ensuring the pages of your website are as compliant as possible with the search engine scoring algorithms Ensuring compelling and action oriented descriptions that encourage visits WebSphere Support Technical Exchange 3
Searchers View of Search Results WebSphere Support Technical Exchange 4
General SEO Statistics 87% of internet users use search engines 72% of searchers are not happy with results of searches Most people click in the top 3 links Sponsored links get < 20% of the clicks Google will not index a home page > 101 K WebSphere Support Technical Exchange 5
SEO Layers WebSphere Support Technical Exchange 6
Common Problems with Pages Spam Keyword stuffing Invisible text and tiny text Page Spoofing Good Stuff that can hurt you! Flash Frames JavaScripts Table Structures Dynamic Content Redirects Slow Loading Pages Graphics vs. text Image Maps WebSphere Support Technical Exchange 7
How does the Algorithm Work Spam and Inflation Detection Verifying that no unethical tricks are being used Verifying that there are not duplicates or redirections Keyword Phrase Inclusion/Content Relevancy Does the exact phrase occur on the page Location and proximity of keyword and/or keyword phrase What is the relationship of the keyword to the content? How many other similar or relevant pages on the site are connected to this page? Internet Relevancy How many other sites/pages are linked to this site and page? How relevant are the pages/sites linking to the page? How are the other links references which point to the page? WebSphere Support Technical Exchange 8
Key Algorithm Attributes On Page Keyword Frequency How many times does the keyword phrase appear on the page (First 250 words most important) Keyword Density How many times does the keyword phrase appear as a percent of all words (No more than 20% density of any particular word) Keyword Prominence Importance of the keyword phrase as determined by its position on the page (Goal is 100% prominence) Anchor Text The keyword phrase appearing in the hyperlink to your site Title Tags are the MOST IMPORTANT attribute <title> ibm.com Software Group International Business Machine </title> WebSphere Support Technical Exchange 9
Optimal Keyword Locations WebSphere Support Technical Exchange 10
Commerce Specific SEO WebSphere Commerce provides functionality to help improve the results of search engine indexing and ranking with the following features: URL Mapping Site Map Search Ranking WebSphere Support Technical Exchange 11
Commerce Specific SEO Why use URL Mapping? Dynamic, database-driven URLs such as those generated by WebSphere Commerce contain stop characters such as?, &, and %, which can easily overwhelm search engine crawlers. http://shashvat.torolab.ibm.com/webapp/wcs/stores/servlet/topcategoriesdisplay?langid= -1&storeId=10001&catalogId=10001 Search engines limit the amount of dynamic URLs that they index. Quote from Google help (http://www.google.ca/webmasters/2.html) Reasons your site may not be included. Your pages are dynamically generated. We are able to index dynamically generated pages. However, because our web crawler can easily overwhelm and crash sites serving dynamic content, we limit the amount of dynamic pages we index. Limited parameters in dynamic URLs (restricted to two or less). Session Management Session IDs are great for human vistors, but spiders encounter problems if they cache a dynamic URL with a session ID. If that session ID times out, the indexed page will most likely point any search engine referrer to an error page and the search engine spider will be unable to return to your page for further spidering. For that reason, most search engine spiders do not cache dynamic URLs with session IDs. (http://www.seotoolset.com/tools/dsm.html) WebSphere Support Technical Exchange 12
Session Management URL Rewriting with Session ID WebSphere Support Technical Exchange 13
Commerce Specific SEO URL Mapping Provides the ability to remove the stop characters by mapping WebSphere Commerce's dynamic URLs to static ones so that search engines can index the dynamic pages. Perl script Manual steps For example, it can map the following static URL: webapp/wcs/stores/servlet/product_10001_10001_10032_-1 to the dynamic WebSphere Commerce URL: webapp/wcs/stores/servlet/productdisplay?storeid=10001&catalogid=10001 &productid=10032&langid=-1 WebSphere Support Technical Exchange 14
URL Mapping Dynamic URLs WebSphere Support Technical Exchange 15
URL Mapping Static URLs WebSphere Support Technical Exchange 16
Commerce Specific SEO Site Map Provides an entry point for the search engine crawler to easily follow the links within your web pages. A site map is used to address these two challenges: Changes to the site are not quickly reflected in the search engine indices. Most Web pages are designed for human visitors, not crawlers. These pages usually throw off crawlers due to the excessive number of graphics and large page size. A site map helps to optimize the entire structure of the site for a crawler by providing an alternate set of web pages built specifically so that crawlers can quickly access and index a large number of embedded pages. Site maps facilitate deep searches of the site. WebSphere Support Technical Exchange 17
Commerce Specific SEO Search Ranking When a search engine analyzes a page, some specific locations are given more weight than others, and so it is important to put appropriate keywords in these locations. Some of the locations that are ranked high in search results are: Page title The page title is the text that appears in a browser s title bar. The page title tag is a very important consideration in ranking searches. Put top searched keywords in the title. Page heading The page heading is also very important for search engines. First sentence of the body In the first sentence, carefully craft words that describe the purpose of the page, and that attract visitors to click on this entry in the search results page. WebSphere Support Technical Exchange 18
Search Ranking Product Management GUI from WebSphere Commerce Accelerator Use the appropriate fields to store the words in the different page locations, as follows: for the page title, use the Short Description field for the heading, use the first Auxiliary Description field for the alt tag, use the second Auxiliary Description field for the body, use the Long Description field for the keywords in the meta keyword tag, use the Keyword field WebSphere Support Technical Exchange 19
Product Management GUI from Accelerator WebSphere Support Technical Exchange 20
Product Management GUI from Accelerator WebSphere Support Technical Exchange 21
Product Management GUI from Accelerator WebSphere Support Technical Exchange 22
Commerce Specific SEO Caching Considerations Dynamic URLs Application server level Remote web server level Static URLs Application server level only No edge caching because Akamai does not support static URLs. WebSphere Support Technical Exchange 23
Caching WebSphere Support Technical Exchange 24
Commerce Specific SEO ibm.com Sample WebSphere Commerce customer sites that implemented SEO solutions: http://www.ibm.com 2 million pages indexed now Up from 10,000 pages in Google 2 years ago WebSphere Support Technical Exchange 25
Commerce Specific SEO Commerce Sites not indexed or ranked very well Main page uses flash. Not search engine friendly. No ranking. Redirected index.jsp (301, 302, 303, 410) http://shashvat.torolab.ibm.com/webapp/wcs/stores/servlet/consumerdirect /index.jsp URL Redirects references: http://knowledge.storage.ibm.com/manual/mod/mod_alias.html http://www.isitebuild.com/301-redirect.htm http://www.internet-search-engines-faq.com/301-redirect.shtml Javascript No ranking javascript menus http://www.ibm.com 2 million to 500 pages in 1 week (because of javascript > 101K limit!) Dynamic URLs only Product pages (dynamic URLs). WebSphere Support Technical Exchange 26
SEO Exercise We have provided the functionality to remove the inhibitors so that the pages can be indexed by search engines, and to facilitate the optimization of page content. The ranking of your pages in the search results depends largely on how you optimize your pages. WebSphere Commerce's search engine optimization feature consists of the following functions: 1) URL mapping, which provides the ability to remove the stop characters by mapping WebSphere Commerce's dynamic URLs to static ones so that search engines can index the dynamic pages. 2) Site map capability, which provides an entry point for the search engine crawler to easily follow the links within your web pages. 3) WebSphere Commerce helps to facilitate the optimization of page content so that the page is ranked high in search engine results. It provides the ability to easily modify words in the locations that are important for crawlers, by using the Product Management GUI, or by using the Change Pages GUI in WebSphere Commerce Accelerator. WebSphere Support Technical Exchange 27
SEO Exercise 1) Change reload interval to 10 sec so it reloads JSPs faster Location: C:\WebSphere\AppServer\config\cells\nodeName\applications\WC_demo.e ar\deployments\wc_demo\stores.war\web-inf\ibm-web-ext.xmi 2) Enable URLMapperConfig Location: WC_installdir/instances/instance_name/xml/instance_name.xml <component compclassname="com.ibm.commerce.datatype.urlmapperconfig" enable="true" name="urlmapperconfig"> <property UrlMapperFile="C:/WebSphere/CommerceServer56/xml/mapping/ne wurlmapper.xml" display="false /> </component> 3) Enable the cache filter (already done in runtime) Location for development environment: WCDE_installdir\workspace\Stores\Web Content\WEB-INF\web.xml Locate and uncomment the following pair of XML elements: <filter id="filter_1"> <filter-mapping id="filtermapping_1"> WebSphere Support Technical Exchange 28
SEO Exercise Site Map 4) Create a Site Map determine what pages should be indexed WAS_installdir/installedApps/cell_name/WCServer_enterprise_archive /Stores.war/store_name/SiteMap copy over the entire directory of ShoppingArea to the SiteMap directory: WAS_InstallDir\installedApps\<nodename>\WC_demo.ear\Stores.war\ConsumerDirect\ShoppingArea 5) Add URL mappings to the URL mapping file. Location: WC_installdir/xml/mapping/newUrlmapper.xml E.g. add this line to the top of the page: <pathinfo_mappings separator="_" subdirectory="sitemap"> WebSphere Support Technical Exchange 29
SEO Exercise Mapping webapp/wcs/stores/servlet/productdisplay?storeid=10001&catalogid=10001&productid=10032&l angid=-1 should map to <mappings> <pathinfo_mappings separator="_"... > <pathinfo_mapping name="product" requestname="productdisplay"> <parameter name="storeid" /> <parameter name="catalogid" /> <parameter name="productid" /> <parameter name="langid" /> </pathinfo_mapping>... </pathinfo_mappings> </mappings> This will map webapp/wcs/stores/servlet/product_10001_10001_10032_-1 to the above address WebSphere Support Technical Exchange 30
SEO Exercise Site Map Caching If you are using a site map, set up separate caching for the site map pages by adding a component element with the ID of subdir to your site's cachespec.xml file Create a cache-entry if no caching has been set up yet. Add the following to the cache entry (if you want both dynamic and static URL JSPs to be cached and served individually): <component id="subdir" type="parameter"> <required>false</required> </component> WebSphere Support Technical Exchange 31
SEO Exercise Convert JSP pages Convert JSP pages with dynamic URLs to JSP pages with static URLs: 1) Run the urlmapping.pl Limitations: The script does not handle JSTL or Tags generated dynamically by either Java or other scripts. For example: out.println("<a href=\"auginterest?aucitemid=<%=aucid%>\" \\\">. OR 2) Manually, change the dynamic URLs in JSP pages to static URLs WebSphere Support Technical Exchange 32
SEO Exercise Convert JSP Page Comment out the following from your JSP page: <%-- The URL command that will display the sub-category --%> <%-- Added line below comments as a substitute <c:url var="categorydisplayurl" value="categorydisplay"> <c:param name="catalogid" value="${wcparam.catalogid}" /> <c:param name="storeid" value="${wcparam.storeid}" /> <c:param name="categoryid" value="${subcategory.categoryid}" /> <c:param name="langid" value="${langid}" /> <c:param name="parent_category_rn" value="${categoryid}" /> <c:param name="top_category" value="${categoryid}" /> </c:url> --%> Add <c:set var="categorydisplayurl value="category2_${wcparam.catalogid}_${w CParam.storeId}_${subCategory.categoryId}_${langId}_${categoryId}" /> WebSphere Support Technical Exchange 33
SEO Exercise Final steps If you are using a site map, include a link to the site map starting page from the header, footer, or sidebar. If you changed the WebSphere Commerce configuration file (instance.xml or any xml files and properties files), restart the WebSphere Commerce Server. Unix/Linux requires file permission resetting wcnonroot.sh WebSphere Support Technical Exchange 34
Example WebSphere Support Technical Exchange 35
Third Party SEO Tools Various SEO Tools Free Online Tools IBP Top 10 Optimizer Search Engine Spider Simulator Keyword Generator Keyword Density Analyzer Search Engine Submitter Search Engine Ranking Checker Web Site Traffic Analyzer Comprehensive Reports Xenu Broken links List of redirected URLs List of valid URLs you can submit to a search engine Site Map of HTML pages with a Title Web CEO WebSphere Support Technical Exchange 36
Commerce Specific SEO Summary URL Mapping, SiteMap, Search Ranking Out of the box, runtime code only available in WC 5.6.0.2 and higher. (WC 5.4, 5.5 APAR) Edge caching does not support static URLs. May need to maintain two sets of JSPs. Static URLs (/SiteMap directory on application server) Dynamic URLs (Original directory on web server or application server.) Urlmapping.pl perl script does not support JSTL. Commerce enabled portal URLs do not support URL Mapping. Session Management Jsessionid in URL is not search engine friendly. Commerce URL Mapping feature does not handle get and post forms. Even with URL Mapping, Site Map and Search Ranking, we cannot guarantee high ranking. Many other factors. Further SEOs are usually done through consulting or services. WebSphere Support Technical Exchange 37
Summary Inclusion URL Mapping Site Map Ranking Keywords Page titles and file names Meta tags Inbound links, link popularity Traffic Optimal keywords Brand names Right keywords in the right element in the right combination! WebSphere Support Technical Exchange 38
Reference InfoCenter: 5.6.0.2 Search engine optimization http://publib.boulder.ibm.com/infocenter/wc56help/index.jsp?topic=/co m.ibm.commerce.developer.doc/concepts/csdsearchopt.htm DeveloperWorks Whitepaper: http://www- 128.ibm.com/developerworks/websphere/library/techarticles/0509_khu sial/0509_khusial.html WebSphere Support Technical Exchange 39
Additional WebSphere Product Resources Discover the latest trends in WebSphere Technology and implementation, participate in technically-focused briefings, webcasts and podcasts at: www.ibm.com/developerworks/websphere/community/ Learn about other upcoming webcasts, conferences and events: www.ibm.com/software/websphere/events_1.html Join the Global WebSphere User Group Community: www.websphere.org Access key product show-me demos and tutorials by visiting IBM Education Assistant: ibm.com/software/info/education/assistant Learn about the Electronic Service Request (ESR) tool for submitting problems electronically: www.ibm.com/software/support/viewlet/probsub/esr_overview_viewlet_swf.html Sign up to receive weekly technical My support emails: www.ibm.com/software/support/einfo.html WebSphere Support Technical Exchange 40
Questions and Answers WebSphere Support Technical Exchange 41