Dave Hoernig

Director of Software Engineering

What is a Canonical URL and Why Should I Care?

A canonical URL or “canonical link” is an HTML element that helps search engines avoid the appearance of duplicate content. It does this by identifying a preferred version of a web page. Using canonical URLs improves your site’s SEO and makes searching the site easier for your visitors. The canonical link appears in the head section of a web page and looks like this:

<link rel=”canonical” href=”http://www.yoursite.com/page-path/page-title/” />

How it works

Imagine you’re throwing a party at your home and you provide directions to your guests. (I recognize that nowadays people will just plug your address into their navigator, but my father refuses to use such technology and still prefers written directions and paper maps.) Knowing that your guests will be coming from different starting points, you provide a different set of directions whether they are coming from the north, east, south, or west. Each set of directions presents a differt route, but each ends up at your house.

Now consider that you publish a news story to your website, and your website allows your visitors different paths to get to news stories. One path may be to navigate to a menu choice “News” and click the link to your story. Another might be to click a link from a section titled “Latest News” on your home page. A third might be that your visitor navigated to some other page and saw the link to your news story in a side bar of related content. This could result in three different URLs:

No matter how visitors navigate to your news story, they will end up reading the same content, even if the URL and the appearance of the web page around the storyare different based on how they got there. Likewise, the different directions you offer your party guests will result in them all arriving at your home regardless of which route they took. The directions you provided your guests are like your web pages and your home address is like the canonical URL! There are different ways to get there, but only one home. Following through with the news story example, each of the pages above should have the same canonical URL. It might look like this:

<link rel=”canonical” href=”http://www.yoursite.com/news/archives/story-title/” />

Search engines crawl through links on your site just like humans only [very much] faster. That means that Google will find all three paths to your news story just as visitors will. Should it show all three results? No, instead when it sees the canonical URL – common to all three pages – Google presents that one. In doing so, Google avoids the appearance of duplicate content and your website visitors are not confused by multiple links to the same story. That’s why canonical URLs are important.

Historical footnote

The canonical link element was introduced in 2009 by consensus among the major search engines Google, Yahoo! and Bing. It was formally added as an HTML standard in 2012 and is now an expected feature of all modern content management systems.

 

Dave Hoernig

Director of Software Engineering

Farewell Google Site Search, Hello Google Custom Search Engine

Google wouldn’t be Google if it wasn’t shaking things up with its products and offerings. The latest shake up? Sunsetting the Google Site Search.

As you may have heard, over the course of the next year, Google Site Search will be discontinued, leaving in place Google’s Custom Search Engine (CSE), which will continue to be ad-supported. As of April 1, 2017 Google has stopped selling licenses and renewals for the Google Site Search, and will completely phase it out by April 1, 2018.

What are the differences between the old Site Search and the Custom Search Engine? The biggest, notable differences are that:

  • Ads are required. Google will, however, make exceptions for 501(c)(3) organizations.
  • Google branding is required with the new search version, and cannot be disabled, even for 501(c)(3) organizations.
  • There are monthly search query limits, so if you are running a high-traffic website there is a chance that the search will stop working once you hit your limit.

Wondering what this means for your organization and your website’s site search if you are a Google Site Search user?

Nothing, until your current Google Site Search license expires. You will continue to have access to the Google Site Search and your implementation and settings will stay the same until your license expires. At that time, Google will automatically convert your site search to the ads-supported CSE version and the changes mentioned above will take effect.

If you are a 501(c)(3), are okay with the Google branding on your site search, and have a relatively low site search usage on your website, the transition to CSE should continue to meet your needs. Once you are converted, you will simply need to disable the ads and should also be prepared to provide Google’s legal team with proof of your 501(c)(3) status, if requested. Pretty simple.

If you’re concerned that Google CSE won’t meet your needs, always keep in mind that there are other options on the market. For example, we’ve implemented the Searchblox and Solr site searches for our clients with excellent results. In fact, I recently spoke with CEO Joanna Pineda about why we love the SearchBlox site search so much. If you’re interested in what other options are available to you, please reach out! We’d love to work with you to find the perfect solution for you organization.

Have you been switched to the Custom Search Engine yet? What are your thoughts?

Elaine Heinzman

Content Strategist and Information Architect

Site Search Best Practice: Make the Search Box Bigger

Search drives almost everything online. While lots of us bookmark pages or click on links that take us from one website to another, typing keywords into a search engine and hitting ‘Return’ is how most web users, most of the time, try to find what we’re looking for.

When using search on a specific website (versus a search engine), we want an input box that allows us to see most, if not all, of the words we type in for our search. Yet you’ve probably had the experience of typing search terms into a too-small input box. Maybe the box is too short, so the text shows up looking tiny. Or just as frustrating, your query runs too long and scrolls out of sight.

User-experience gurus Nielsen Norman Group have the data to prove that these small search boxes are not just your imagination: “The average search box is 18-characters wide, [and] 27% of queries were too long to fit into it.”

Better to design a search-input box — or really, any kind of box where the user types in text — to be too wide than too short. And on the taller side, as well, so that there’s some white space around the words.

Don’t box in your users; give them the space they need to quickly review and revise their query before they submit it.

Alan Gunn

Programmer

Search Results Pagination Look Odd? Try Pagination with Sortable Headers

I recently came across some client reports that, when initially run with search criteria, looked correct and displayed properly. However, that all changed once a user selected pagination. book turning pages

The search results soon began to look like nothing I’d searched for, and after a few clicks of Next and Back I could produce errors. When I drilled into the code, I found that the results were ordered by date, but the pagination used the ID of the record. Using the record ID would have been fine if we were only displaying a dump of the data and ordering it by ID, but to have a functioning useful report, this did not work.

I needed a way to order by any report column header, and for the pagination to keep intact the ordered by results as a user moved between the pages. After some quick research I came across the SQL Server function ROW_NUMBER(), used in conjunction with OVER(). This was exactly what was needed to accomplish the report column sorting and the pagination honoring the order throughout the pages.

The result: Users were now able to paginate results, as well as sort by column heading, making for a logical display.

Have you found any tips or tricks for search results?