Many restaurants give birthday freebies and exclusive discounts to customers who sign up for rewards programs, download apps or follow them on social media.

In the Middle Ages, you could pledge loyalty to a king and perhaps get a chunk of land in return. Nowadays, you can pledge loyalty to Burger King and — after spending $5 through its rewards program — get a Whopper. And BK is far from the only restaurant to reward devoted customers with free food.

Many eateries give the royal treatment to diners who either sign up for rewards programs, download mobile apps, subscribe to emails or follow them on social media. If you frequent a few establishments, ask your server or look online for these kinds of opportunities. Here are a few ways signing up can pay off:

Redeem members-only coupons

Restaurants sometimes give exclusive deals to customers who sign up for some sort of loyalty program or other service. For example, after signing up for Arby’s deals, you’ll get a coupon for a free Classic Roast Beef Sandwich with the purchase of a soft drink. And, until the end of 2018, diners using the McDonald’s mobile app can receive free fries with a $1 purchase.

Before redeeming every coupon, consider the spending you may have to do to get “free” food. Would you have bought that soft drink or $1 item if you weren’t promised something free in return? (Once you’re at the counter, could you be tempted to add a milkshake to the bill, too?)

With each coupon, take a minute — preferably away from the scent of sizzling french fries  — to weigh its value.

» Learn how to coupon

Sign up for birthday presents

What better time than your birthday to treat yourself — and your budget, since you’re a year older and wiser with money, right? Many restaurants reward folks who sign up for their loyalty programs with free or discounted food on their birthdays. For frozen treats, you can scoop freebies at Baskin-Robbins, Pinkberry and Dippin’ Dots.

Plenty of other restaurants also have rewards programs that include free food on your birthday. See our list of 37 birthday freebies and discounts.

And while you’re scoping out the handouts, here’s a free idea: Celebrate your birthday by eating free meals across town. (For breakfast, you could start with a free bagel and cream cheese from Bruegger’s Bagels.)

Celebrate national food holidays

Whatever your favorite food, there could very well be a “holiday” commemorating it, such as National Spaghetti Day in January, National Waffle Day in August and National Sandwich Day in November. Following a few of your go-to restaurants on social media can let you know when relevant food days are coming up — as well as freebie opportunities.

For example, on Facebook, Twitter and Instagram, Krispy Kreme announced that customers could get a free doughnut on National Doughnut Day in June and a free coffee for National Coffee Day last fall. And last October, Taco John’s shared a coupon for a free taco on its Facebook page.