Where do former htaccess redirects and header rules belong on WP Engine?

The Citead team, updated

In short. Use WP Engine Web Rules Rewrite Rules for redirects and Header Rules for response headers formerly held in .htaccess.

Definition: On WP Engine, former custom .htaccess redirects belong in the User Portal's Web Rules page under Rewrite Rules. Former response-header directives belong under Header Rules. Default WordPress rewrites are handled at the server level, while custom directives need migration.

Key facts

  • WP Engine says it does not support .htaccess and has deprecated it; custom directives outside the default WordPress rules can be converted using its alternatives. (WP Engine's deprecation documentation)
  • The Web Rules Engine is a User Portal service for IP-based access rules, response headers, and rewrite rules. (WP Engine's Web Rules documentation)
  • New redirects should use the Web Rules page's Rewrite Rules tab. WP Engine's older Redirect Rules page remains available for sites that already use it. (WP Engine's redirect documentation)
  • Header Rules can set or unset response headers and can use conditions such as URI, query argument, request method, header, country code, or IP. WP Engine's Web Rules documentation describes these controls.
  • Web Rules has no bulk-import function for access, header, or rewrite rules. WP Engine's redirect documentation records bulk import for redirect rules only.

Where should former redirects go?

Use the Web Rules page's Rewrite Rules tab for new redirects. WP Engine's redirect documentation marks the separate Redirect Rules page as deprecated for new redirects, although existing rules on that page continue to work. In the User Portal, select Sites, choose the environment, open Web Rules under Advanced when necessary, select Rewrite Rules, click Add rule, enter the rule, and click Save.

A Rewrite Rule has an action, a domain scope, a source, a destination, query-string handling, and optional conditions. The documented actions are Permanent with a 301 response, Temporary with a 302 response, and Internal rewrite. The source is a regular expression matching the original request URI, including its query string. The destination can use capture groups from that source. Keeping the original query string is the default setting.

For a simple path migration, WP Engine gives this configuration pattern:

Action: Permanent
Domain: All domains
Source: /oldpage/
Destination: /newpage/
Original Query String: Keep
Conditions: None are needed

The source documentation also says that Rewrite Rules are read in cascading order and that the first rule whose conditions are met is triggered. The source of a rewrite acts as an implicit URI condition. Web Rules currently has no response-code condition, so a rule cannot be limited to requests that return a particular response such as 404.

Where should former header directives go?

Use Header Rules on the same Web Rules page. WP Engine's Web Rules documentation describes these as response-header rules for Nginx security headers and cache-control behavior. They are read in cascading order and can set or unset a header by name. The documented path is Sites, environment, Web Rules, Header Rules, Add rule, then Save.

Conditions let a header rule target a URI, query argument, request method, request header, country code, or IP. The documented operators are equal to, not equal to, regex matches, and negative regex matches. All conditions attached to one rule must be met.

WP Engine's examples include X-Robots-Tag, Cache-Control, Strict-Transport-Security, and Content-Security-Policy. Its example for the default *.wpengine.com URL is:

Action: Set
Name: X-Robots-Tag
Value: noindex, nofollow
When: All Responses
Conditions:
  Type: Header
  Name: Host
  Operator: Regex matches ~
  Value: .wpengine.com$

The page lists restricted headers, including server, date, x-cache, x-cacheable, and any header that includes WPE.

How should you migrate and test the rules?

Start by separating default WordPress directives from custom directives. WP Engine's deprecation documentation says default WordPress rewrites are handled automatically at the server level. Custom redirects should be translated into Rewrite Rules, and custom response-header behavior should be represented as Header Rules.

The Web Rules Engine does not accept bulk imports. For a large .htaccess redirect list, WP Engine's redirect documentation documents other bulk-import destinations, including its Nginx configuration, the Redirection plugin, and Yoast Premium's redirect manager. It also says that importing redirects into its Nginx configuration becomes inefficient above 1000 redirects and suggests a plugin-based destination at that quantity.

Test changes in a Staging or Development environment before applying them to the live environment. Check the redirect response and destination, the handling of query strings, the order of overlapping rules, and the presence of each intended response header.

FAQ

Can you upload an .htaccess file to Web Rules?

No. WP Engine's redirect documentation says Web Rules does not accept bulk imports for access, header, or rewrite rules. Redirect rules have separate bulk-import options.

Which Web Rules tab handles a 301 redirect?

Use Rewrite Rules and choose the Permanent action. WP Engine's Web Rules documentation documents Permanent as a 301 response and Temporary as a 302 response.

Can a Header Rule run only for one path?

Yes. Add a URI condition and use an exact or regex operator. WP Engine's example targets /resources/ with a regex condition for a Cache-Control header.

Sources

  1. WP Engine, ".htaccess Deprecation and Alternatives", 28 July 2025
  2. WP Engine, "Configure Web Rules Engine", 2 March 2026
  3. WP Engine, "Manage 301 and 302 Redirect Rules", 29 January 2026

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark