TECHNICAL NOTE OutSystems Platform 9.0 SEO Friendly URLs When your Web applications URLs become too complex, they have impact on end-users reading and most of all fall in rankings of search engines. To help you solve this, the OutSystems Platform allows you to configure your URLs, performing Search Engine Optimization (SEO), and making them friendlier to end-users. Table of Contents 1 Introduction... 2 2 Configuring URL Rules... 2 2.1 Page Rules... 2 2.2 espaces Aliases... 4 2.3 Site Rules... 4 2.4 Redirect Rules... 5 3 Other Search Engine Optimization Techniques...6 4 Installing ISAPI Filters and Logging...6 4.1 Installing ISAPI Filters... 6 4.2 Logging... 8 4.2.1 Turning On the Detailed Logging... 8 4.2.2 Turning Off the Detailed Logging... 9 2001-2012 OutSystems - All rights reserved Page 1 / 9 www.outsystems.com
1 Introduction This document describes all of the techniques available in the OutSystems Platform that allow you to simplify your Web applications URLs: making them friendlier, more readable, and laying stress on those really important keywords for your business. Applying these techniques promotes Search Engine Optimizations (SEO) since search engines (and humans) give more relevance to this kind of URLs. Furthermore, you re allowed to configure URLs for duplicate content across different domains, and to handle broken links from former indexed results when your URLs change. 2 Configuring URL Rules In Service Center, the console of the Platform Server, a set of configurations allow you to define rules by which incoming URLs are to be handled and transformed in the OutSystems Platform. These configuration options are available under the ADMINISTRATION tab, in the Friendly URLs option, and are fully described in this section. At runtime, when clicking on a link on a page of your application, the OutSystems Platform optimizes the destination URL, changing it to the best path that takes the most of your SEO Friendly URLs configuration. 2.1 Page Rules Use Page Rules to transform your URLs trailing information such as, page names and page parameters, into relevant keywords for search engines to rank them in a way that clearly describes your pages content. To specify these URLs transformations use the Page Rules List option. All incoming URLs are compared with your rules, one by one, following the order defined in the Page Rules screen. The first rule belonging to the applicable espace matching the URL Pattern value is the one applied: the application displays the Web Screen page and the parameter placeholders in the URL path (Web Screen parameter name enclosed in {}) are passed to the page with their runtime values. When there s Web Screen names ambiguity, prefix the Web Screen name with its Web flow name and a dot (. ). 2001-2012 OutSystems - All rights reserved Page 2 / 9 www.outsystems.com
At runtime, the OutSystems Platform assures that clicking on links to Web Screens that have entries on any of these rules, will have their destination URL transformed to use the URL Pattern. With the above settings, when the application navigates to: Will display the following URL: http://www.starbus.com/insterstatebuses.aspx?from=lisbon&to=faro http://www.starbus.com/insterstatebuses/from-lisbon-to-faro However, it there s only the To parameter in the URL, the last rule is applied because the From parameter is not defined to apply the previous rule. As such, navigating to the URL: http://www.starbus.com/insterstatebuses.aspx?to=faro Will display the following URL: http://www.starbus.com/insterstatebuses/to-faro 2001-2012 OutSystems - All rights reserved Page 3 / 9 www.outsystems.com
2.2 espaces Aliases An espace Alias is an alternative espace name to be used in URLs: normally a simpler, friendlier, and keyword relevant name. To check which espaces have aliases, select the espace Alias List option. To set espaces aliases select the espace Alias List option. Each espace can only have one alias; the original espace name can still be used in URLs. With the above settings, you may simply use Assets or Emails words in your URLs instead of using AssetsManager or EmailCampaignManager, i.e., use: Instead of: http://www.taxianywhere.com/assets http://www.taxianywhere.com/emails http://www.taxianywhere.com/assetsmanager http://www.taxianywhere.com/emailcampaignmanager 2.3 Site Rules Use Site Rules to simplify and organize URLs to better highlight site structure as, for example, www.mycompany.com/site/ or www.mygallery.com/gallerysite/ where the Site and GallerySite parts are disposable. Another possibility is for you to automatically set the application s working language depending on the existence of these disposable parts in the URL. Implement this kind of configurations selecting the Site Rules List option. 2001-2012 OutSystems - All rights reserved Page 4 / 9 www.outsystems.com
All incoming URLs are compared with your rules, one by one, following the order defined in the Site Rules screen. The first rule matching its 'Base URL' value with the beginning of the URL path (excluding the protocol prefix) is the one applied: if there's a language 'Locale' defined it gets set in the application, and if there s a Root Application defined it is executed instead of the default application for the IIS site pointed at by the URL. With the above settings use the simplified www.mycompany.com URL to access mycompany s web site instead of the www.mycompany.com/site URL. The same applies to mygallery s web site, where the www.mygallery.com/gallerysite URL is simplified to www.mygallery.com. On the other hand, the site for Taxi Anywhere displays the application default web page with the language locale automatically set according to the URL. 2.4 Redirect Rules When domain changes occur make your old URLs point to the new ones using the Redirect Rules. It allows for old URL references to keep working, and for search engines to have a way of knowing that a replacement took place, thus not affecting their previous search engine ranking information. To transform incoming URLs and force client-side redirects select the Redirect Rules List option. All incoming URLs are compared with your rules, one by one, following the order defined in the Redirect Rules screen. The first rule matching its Base URL value with the beginning of the URL path (excluding the protocol prefix) is the one applied: the matching part in the URL path is replaced by the rule s Replace With value, remaining the rest of the URL path unchanged. The browser is then redirected to the new URL. With the above settings, when navigating to: http://uk.taxianywhere.com/home.aspx?taxitype=van The browser is redirected to: http://www.taxianywhere.com/uk/home.aspx?taxitype=van 2001-2012 OutSystems - All rights reserved Page 5 / 9 www.outsystems.com
3 Other Search Engine Optimization Techniques Besides using the SEO Friendly URLs feature, there are other techniques you can apply when designing your web sites such as: setting unique and accurate page titles, adding meta tags to your HTML, etc. Click here to learn more about SEO techniques. 4 Installing ISAPI Filters and Logging To start using the SEO Friendly URLs you have to install ISAPI Filters in your Internet Information Services (IIS). For that, follow the steps described in the Installing ISAPI Filters section. Regarding logging, useful for you to detect errors or malfunctions, check the Logging section to see how to turn logging on (and off). 4.1 Installing ISAPI Filters The OutSystems Platform works with ISAPI Filters installed in the IIS of: Windows 2008, or Windows 2012. To install the ISAPI Filter in IIS of Windows 2008 or Windows 2012, perform the following steps: 1. Make sure you have followed all the steps in the OutSystems Platform Server Installation Checklist; 2. Grant write and modify permissions to the logs directory (located under your OutSystems Platform Server installation directory) for the IIS_IUSRS group. 3. Launch Internet Information Services (IIS) Manager: In Windows 2008 open the Windows Start Menu, select Administrative Tools, and then select the Internet Information Services (IIS) Manager application; In Windows 2012 open Server Manager, select Tools, and then select the Internet Information Services (IIS) Manager application. 4. In the IIS Manager tree, under the Sites folder, select the Default Web Site site; 5. Double-click on ISAPI Filters icon to open it, and then click on the Add link on the right-hand side; 2001-2012 OutSystems - All rights reserved Page 6 / 9 www.outsystems.com
6. Set the Filter Name to OutSystems ISAPI Filter, and the Executable to: 32-bit Operating Systems: C:\Program Files\OutSystems\Platform Server\OsISAPIFilter.dll 64-bit Operating Systems: C:\Program Files\OutSystems\Platform Server\OsISAPIFilterx64.dll. Press OK button to finish adding the OutSystems ISAPI Filter ; 7. In the IIS Manager tree, under the Application Pools folder, select the DefaultAppPool pool and then click on the View Applications Action on the right-hand side a. If the Root Application Virtual Path is listed here, double-click it and change the Application pool for the site s default application to OutSystemsApplications ; 8. Test an access to an URL in your browser, for example: http://localhost/servicecenter. If not working, reset your IIS by doing the following: a. Open a Command Line window; b. Execute the IISReset command. After the reset is complete, try accessing the URL again to be sure everything is working. 9. Finally, check that the ISAPI Filter is working properly: open the Windows Event Viewer (it s in the same place as the IIS Manager), in the Application logs look for entries with OutSystems ISAPI Filter as Source, and check that no errors occurred; 2001-2012 OutSystems - All rights reserved Page 7 / 9 www.outsystems.com
10. The ISAPI Filter is set up and ready for use. 4.2 Logging Turn on detailed logging of your SEO Friendly URLs to keep track of detailed information about URLs transformations and ISAPI Filters status. The log information is written into a file named OsISAPI.log that is located under the logs directory on each of your Front-end servers. Depending on your ISAPI Filters configuration and the number of accesses to transformed URLs, logging may involve writing large amounts of data into the log file, and it may lead to degradation of your Platform Server s performance. As such, before turning on the logging, try to evaluate the impact on your Platform Server s performance. To switch detailed logging on and off you must edit a file in all Front-end servers you want to change that setting: the file name is OsISAPIConf.cache and it is located in the same directory as the log file (described above). 4.2.1 Turning On the Detailed Logging Open the OsISAPIConf.cache file with a simple text editor like NotePad or WordPad. Change the file content to the word Verbose, and save the file. The log starts being written verbosely: #4808 2010-04-14 10:20:22 [WARNING] - Logging level set to VERBOSE. #4808 2010-04-14 10:20:26 [INFO] - Processing localhost/servicecenter/error_logs.aspx #4808 2010-04-14 10:20:26 [INFO] - Transformed to localhost/servicecenter/error_logs.aspx #4808 2010-04-14 10:23:31 [INFO] - Number of Redirect/Site Rules loaded: 4, Number of Alias Rules loaded: 54, Number of Page Rules loaded: 6 #4808 2010-04-14 10:23:48 [INFO] - Processing localhost/servicecenter/_osglobaljs.en.js?95 2001-2012 OutSystems - All rights reserved Page 8 / 9 www.outsystems.com
4.2.2 Turning Off the Detailed Logging Open the OsISAPIConf.cache file with a simple text editor like NotePad or WordPad. Change the file content to the word Quiet, and save the file. The log stops being written verbosely: #4808 2010-04-14 10:36:35 [WARNING] - Logging level set to QUIET. #4808 2010-04-14 10:37:05 [INFO] - Synchronizing Data... #4808 2010-04-14 10:37:07 [INFO] - Number of Redirect/Site Rules loaded: 4, Number of Alias Rules loaded: 54, Number of Page Rules loaded: 6 #4808 2010-04-14 10:38:58 [INFO] - Number of Redirect/Site Rules loaded: 4, Number of Alias Rules loaded: 54, Number of Page Rules loaded: 6 2001-2012 OutSystems - All rights reserved Page 9 / 9 www.outsystems.com