Overview
GT Link Manager settings live at GT Links → Settings. There are five core configuration options, 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.
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.
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.