To keep your house smelling good while on vacation make sure to sprinkle some baking soda onto carpets and set some baking soda in open containers or boxes out on counters or around the house such as on your coffee tables, end tables, bedside tables etc.
The baking soda will help absorb any odors in the air.
You should also clean your carpets as well as use a carpet cleaning machine and open your windows to get some air into the house before you leave.
While gone set the air conditioner to come on some to allow the humidity to get out of the house if it's summertime as the humidity can cause bad house smells and cause mold to grow.
Use automatic air fresheners as well to help keep the house smelling good or have someone come by as well to open doors and windows for a little while to keep the house from becoming stuffy.
You can also place potpourri in your home and in your bedrooms, bathrooms etc which help to keep the house smelling fresh and clean while on vacation.
Turn off the main water supply as well to keep from coming back to a potential water leak which has happened to myself and many people.
You can ask the city or town to temporarily turn your water service off especially if you're gonna be gone away from your home longer than a month.
Then when you come back have them turn it back on.