GT Link Manager settings fit on one screen: the base prefix, the default redirect type, advanced redirect modes, geolocation targeting, uninstall behavior, plus permalink and diagnostics utilities. A handful of decisions, each with a sensible default. This lesson explains every option and flags the one that’s a genuine breaking change if you alter it later.

Overview
GT Link Manager settings live at GT Links → Settings. There are the core configuration options, a Geolocation Targeting section (added in 1.7.0), a utility to flush permalink rules, and a diagnostics tool for troubleshooting. All settings are stored in wp_options under the key gtlm_settings.
Base prefix
The base prefix is the path segment that appears between your domain and the link slug. With the default prefix of go, a link with the slug hubspot resolves to yoursite.com/go/hubspot.
You can change the prefix to any lowercase alphanumeric string, with hyphens allowed. Common choices are out, link, r, ref, or a custom word that fits your brand.
After changing the prefix, you must flush permalinks. Either click the Flush Permalinks button on the settings page, or go to Settings → Permalinks and click Save Changes. Until you flush, the old prefix continues to work and the new prefix returns a 404.
Prefix changes don’t update any existing branded URLs stored in your content. If you’ve already distributed links containing the old prefix, those links will stop working after the change. Changing the prefix is a breaking change, plan accordingly.
The prefix is validated on save: it’s lowercased, stripped to alphanumeric characters and hyphens, and must not be empty. If an invalid value is saved, it falls back to go.
Default redirect type
This setting controls the HTTP status code used for newly created links. It doesn’t change existing links.
301 (Permanent) is the default and appropriate for most use cases. Search engines treat 301 as a signal that the destination is the canonical URL, though for redirect URLs from your own domain this distinction rarely matters in practice.
302 (Temporary) tells browsers and search engines not to cache the redirect or assume permanence. Use this when you’re temporarily routing to a promotion or seasonal page.
307 (Temporary, method-preserving) is like 302 but preserves the HTTP method on the redirected request. This matters for non-GET requests. For standard affiliate and outbound links, 307 behaves identically to 302 in practice.
Default rel attributes
These checkboxes set which rel attributes are applied to newly created links. You can enable any combination of nofollow, sponsored, and ugc.
Rel attributes are sent as a Link response header on the redirect response, they’re not injected into HTML. For affiliate links, the common setup is nofollow + sponsored.
These defaults apply only to new links. Changing this setting doesn’t affect existing links.
Default noindex
When this checkbox is enabled, new links are created with the noindex flag active. This causes the redirect response to include an X-Robots-Tag: noindex, nofollow header, which instructs search engine crawlers not to index the branded URL.
This is a reasonable default for most redirect use cases, you generally don’t want yoursite.com/go/slug appearing in search results.
Enable Advanced Redirects
This checkbox enables direct and regex link modes. When disabled (the default), only standard prefix-based links are available and resolved. There is zero performance overhead from having this setting present but disabled, the redirect handler skips all direct and regex matching logic entirely.
When enabled, the link creation and edit forms show a Link Mode selector with three options: Standard, Direct, and Regex. The redirect handler adds two additional resolution steps after the standard prefix-based lookup:
- Direct match: the full request path is checked against links with
link_mode = 'direct'. - Regex match: the request path is tested against all active regex rules, ordered by priority.
These additional lookups only run when no standard prefix-based match is found, so existing standard links continue to resolve at the same speed.
Disabling this setting after creating direct or regex links does not delete those links. They remain in the database but stop resolving redirects until the setting is re-enabled.
Geolocation Targeting
Version 1.7.0 added a Geolocation Targeting section to the settings page. It controls whether individual links can route visitors by country, and how the plugin detects that country.
Enable Geolocation: the master switch, off by default. When enabled, the link editor gains a Geolocation section where you build per-link country rules. When disabled, no link routes by country and detection is never invoked. Geolocation costs nothing on links that don’t use it, the check is a single array read.
Detection Method: how the country is read. There is no GeoIP database to install and no external API call, the country comes from a request variable your CDN or web server already provides.
Auto-detect (recommended): checks Cloudflare’sCF-IPCountryfirst, then CloudFront, Vercel, Google App Engine, and common web server GeoIP variables (nginx GeoIP2, Apache mod_geoip, mod_maxminddb).Cloudflare only: ignores every other source. This is the strictest option, because Cloudflare overwrites its own country header at the edge and a visitor can’t forge it.Custom header only: reads only the header you name in the Custom Country Header field.
Custom Country Header: only needed if your CDN sends the country in a header the plugin doesn’t already recognize, like X-Geo-Country. Leave it blank otherwise.
Debug Header: when enabled, geo redirects include an X-GTLM-Country response header showing the detected country, its source, and whether a rule matched. Useful while setting up, turn it off once things work.
Detected Now: a live readout showing which country and source resolved for the current request. This is the fastest way to confirm your CDN is forwarding a country header. It also distinguishes two very different “no country” situations: nothing is proxying the site (normal on local, staging, or direct-to-origin installs, so no country is expected) versus your CDN is in front but didn’t send a country header. Only the second is a misconfiguration, and the readout tells you how to fix it, on Cloudflare that means turning on IP Geolocation for the zone.
Check Detection: a button that lists every country header present on the request with its raw value, and runs a loopback self-test. It sends your site a request carrying a country header and reports what the plugin detected at the other end, which proves detection works even on a local install with no CDN in front. You can also type a country code to validate it before using it in a rule.
The per-link rule builder these settings unlock is covered in the geolocation targeting lesson.
Flush Permalinks button
The Flush Permalinks button regenerates WordPress’s rewrite rules and clears the rewrite cache. You need to do this whenever you change the base prefix. It’s equivalent to visiting Settings → Permalinks and clicking Save Changes, but scoped to just flushing rewrite rules without changing any settings.
If your redirect URLs are returning 404 errors after activation or a prefix change, clicking this button is the first thing to try.
Run Diagnostics button
The diagnostics tool runs a series of checks and displays the results inline:
It checks whether both custom database tables (wp_gtlm_links and wp_gtlm_categories) exist and are accessible.
It checks whether the rewrite rules for the current prefix are registered and active.
It checks whether a test redirect actually resolves, it temporarily creates a test link, attempts to hit the redirect URL, and verifies the response.
When geolocation is enabled, the diagnostics output also shows a Geolocation row: the country detected for the current request, its source, and which country headers (if any) were present.
The results appear as a list with pass/fail indicators. If any check fails, the diagnostic output includes context to help identify the cause.
Capability requirements
The settings page requires the manage_options capability by default. This means only administrators can access and modify plugin settings. You can change this with the gtlm_capabilities filter by checking for the manage_settings context.
Programmatic settings override
If you need to set configuration values without using the admin UI, the gtlm_settings filter lets you override any setting at runtime:
add_filter( 'gtlm_settings', function( $settings ) {
$settings['base_prefix'] = 'ref';
$settings['enable_advanced_redirects'] = 1;
return $settings;
} );This is useful for managing settings via code in a must-use plugin or theme functions file, particularly in environments where multiple sites share the same configuration.
The “Enable Advanced Redirects” toggle here unlocks the Direct and Regex modes covered in the redirect system lesson. The diagnostics panel output is decoded in troubleshooting.