My Frugal Tech

  • Home
  • About
  • Services
  • Contact

Sorting Google Custom Search Results by Date

September 16, 2011 by Mitchell Wischmann

So now that you've implemented Google Custom Search into your site, you may be wondering how you can sort the results. By default, Google does not sort the results at all. You may wish to sort by date to have your most recent posts appear at the top.

Here's how you can do that!

  1. Log in to Google Custom Search.
  2. Click on the Control Panel link next to your search engine.
  3. Click the "Advanced" link on the left hand side, then in the "Context" section, click "Download in XML format".
  4. Open the downloaded file in a text editor.
  5. Find the <BackgroundLabels> section of the file. Right before the </BackgroundLabels> line, add the following:

    <Label name="recent4" mode="BOOST" />

  6. Save the file and go back to the Google Custom Search control panel.
  7. Under the "Context" section, click "Choose File", navigate to the file you've just edited, and click "Upload".

That's all there is to it! Your posts should now be sorted by date, with the most recent posts on the top of the results page.

Filed Under: Google

Comments

  1. Timo says

    October 16, 2011 at 8:15 pm

    Hi Mitchell,

    This seems to solve a problem that I have. But I cannot get it to work. I keep on getting an error about the XML file when I upload it to the CSE. Which editor do you use to edit the file?

    Thanks for your help!
    Timo

    • Mitchell Wischmann says

      October 16, 2011 at 8:44 pm

      Hi Timo,

      I use TextEdit on the Mac to edit the XML file. You should also be able to use Notepad on Windows. Just make sure it's being saved as an XML file.

Testimonials

Angie Schuckenbrock

I highly recommend My Frugal Tech! I have requested Mitchell’s services multiple times and I am always extremely pleased with his work. Not only do I feel completely safe allowing him access to my site, but he works quickly and exactly to my specifications. Mitchell definitely knows his stuff and his prices are amazing!!

Angie Schuckenbrock
Frugal 4 Four

Melissa Garcia

Mitchell is amazing and very talented. I know I can trust Mitchell with my personal information and he is very quick to respond. He is very affordable and he gets the job done. I go to him for all my technical needs.

Melissa Garcia
Consumer Queen

Dana Zeliff

My Frugal Tech has helped me with an array of tasks to keep my website running smoothly. The professional service provided to customers is quick and efficient with competitive rates. I highly recommend My Frugal Tech for all your website development and maintenance needs!

Dana Zeliff
The Coupon Challenge

Kristie Sawicki

Thanks to the work Mitchell has done for my site I am able to put my focus on what I love most, and that’s writing. I can trust that whatever is broke he is more than able to fix it, and many times in very little time!

Kristie Sawicki
Saving Dollars and Sense

Andrea Deckard

My Frugal Tech consistently delivers timely support and results while creating custom requests that are exactly what I envisioned in my head. Mitchell always acts in the most professional way with his customers’ needs remaining as the priority at all times. He is one of a select few that I trust to provide technical support for my websites.

Andrea Deckard
Savings Lifestyle

Jennie Leanne

Mitchell is simply AMAZING to work with. He understands exactly what I do and exactly what I need which has saved many hours of my time since I’ve started working with him.

Jennie Leanne
Bargain Blessings

Melissa Buckles

I can not say enough good things about My Frugal Tech. I have been impressed with his service and delivery. He made all the changes to my website that I requested quickly and right to my specifications. I give My Frugal Tech two big thumbs up!

Melissa Buckles
Everyday Savvy

Copyright © 2025 My Frugal Tech. All Rights Reserved.