AffEasy allows you to set expiration dates for your links, giving you more control over the lifespan of your short URLs.

This feature is only available for Pro plans and above.

To set an expiration date for your AffEasy links, follow these steps:

  1. Open the link builder in your AffEasy dashboard.
  2. Toggle the “Link Expiration” switch to reveal the expiration options.
  3. You can set the expiration date in two ways: a. Use natural language: Type in any time interval, such as “in 2 hours” or “tomorrow at 5PM”. AffEasy will automatically convert this to the correct date-time format. b. Use the date-time picker: Manually select the date and time from the provided calendar and time selector.

When a user tries to access an expired link, they will see an “Expired Link” page.

Clicks to the link after the expiration date will not be tracked in your analytics.

Setting a custom expiration URL

You can redirect users to a specific page when a link expires by setting a custom expiration URL:

  1. In the link builder, under the Link Expiration section, locate the Expiration URL field.
  2. Enter the custom URL you want users to be redirected to when the link expires.

For consistency across your links, you can set a default expiration URL for all links under a specific domain:

  1. Go to the AffEasy dashboard.
  2. Click on the Domains tab in the top navigation bar.
  3. Find the domain you want to set the default expiration URL for and click the button to open the dropdown menu.
  1. Click on the Edit button in the dropdown menu to open the Edit domain modal.
  2. Toggle the Advanced options section.
  3. In the Default Expiration URL field, enter the URL you want to redirect users to when any link under this domain expires.
  1. Click on the Save changes button to apply the settings.

Advanced expiration features

AffEasy offers several advanced features to enhance your link expiration strategy:

Gradual expiration

Instead of a hard cutoff, you can set up a gradual expiration process:

  1. In the link builder, enable “Gradual Expiration” under the Link Expiration section.
  2. Set multiple expiration stages, each with its own redirect URL and expiration time.

This allows you to create a staged expiration process, useful for phasing out campaigns or managing time-sensitive content.

Expiration notifications

Set up notifications to alert you before your links expire:

  1. In your AffEasy dashboard, go to Settings > Notifications.
  2. Enable “Link Expiration Alerts” and set your preferred notification time (e.g., 24 hours before expiration).

For developers and advanced users, AffEasy provides API access to set link expiration programmatically. Here’s an example of how to create a link with an expiration date using the AffEasy API:

import { AffEasy } from "affeasy";

const affeasy = new AffEasy();

await affeasy.links.create({
  url: "https://example.com/limited-offer",
  expiresAt: "2024-12-31T23:59:59Z",
  expirationUrl: "https://example.com/offer-ended",
});

To make the most of the link expiration feature, consider these best practices:

  1. Use expiration dates for time-sensitive campaigns or limited-time offers.
  2. Set meaningful expiration URLs that provide value to users who click expired links.
  3. Regularly review and update your expired links to maintain a clean link inventory.
  4. Combine link expiration with other features like geo-targeting or device targeting for more sophisticated campaigns.
  5. Use the gradual expiration feature for important links to create a smooth transition.

Need Help?

If you have any questions about setting expiration dates for your links or using any of our advanced features, please don’t hesitate to contact our support team. We’re here to help you make the most of AffEasy’s powerful link management tools!