{Nadeem Haddadeen}

Arabic SEO Consultant, Python for SEO From Jordan

Responses and canonicalisation

301 and 302 redirects: choosing, testing, and fixing redirect loops

Choose permanent or temporary redirects, trace the final destination, and reproduce chains or loops before changing a rule.

301 and 302 redirects: choosing, testing, and fixing redirect loops
Background photograph: Pankaj Patel / Unsplash. Title design: Nadeem Haddadeen.

A redirect tells the client to request another URL. The useful questions are why the move exists, whether the response matches that intention, and whether the destination contains the expected content.

For a permanent replacement, a 301 or 308 communicates a permanent move. A 302 or 307 communicates a temporary move. Temporary redirects are not automatically incapable of passing search signals; their meaning is the duration and behaviour of the move. Google’s redirect documentation explains the supported types.

Write the intended mapping first

Before adding a rule, record the source, destination, and reason. For example, a product category renamed permanently might move from /trainers/ to /running-shoes/. A short-lived campaign may have a temporary destination while its usual page remains the long-term address.

The destination must be a relevant working page. Redirecting every removed URL to the homepage can confuse visitors and does not recreate the missing content.

Add the rule in the right layer

On WordPress, the Redirection plugin is one way to manage application-level redirects. Enter the source path, destination, and intended response type, then test the result in the browser. Exact controls depend on the installed version.

Rules can also exist in a CDN, web-server configuration, or another plugin. Find the layer already handling the route. Adding the same intention in several places can produce conflicting behaviour.

For a website migration, maintain a reviewed mapping and a rollback plan. The mapping should cover the actual moved pages and important incoming paths, rather than broad rules whose destinations have not been checked.

Trace the full request sequence

Open DevTools Network, enable Preserve log, and request the old address. Record each response and Location destination. Inspect the final document’s content as well as its status.

Expected permanent move:
/old-category/ → 301 → /new-category/ → 200

Unnecessary chain:
/old-category/ → 301 → /temporary-path/ → 301 → /new-category/ → 200

Loop:
/old-category/ → /new-category/ → /old-category/ → ...

A chain can accumulate when rules are added over time. Point the old source directly to the current destination where appropriate. Update current internal links to the intended address too, while keeping redirects needed for old incoming URLs.

Reproduce a loop before changing it

An A-to-B-to-A loop may involve two plugins, or a rule at the CDN conflicting with the origin. HTTPS and hostname rules are common places to inspect. For example, one layer may force a hostname that another layer redirects away from.

Disable or correct the conflicting rule in a controlled change. Recheck both source and destination, plus neighbouring routes that share the same pattern. Clearing the relevant cache may be necessary to see a revised redirect.

Keep redirects separate from canonicals

A canonical element proposes a preferred URL for indexing while normally leaving the visitor on the requested page. A redirect sends the client to another address. The canonical URL guide explains the implementation difference.

After a fix, retain the source-to-destination record and repeat the test with the same conditions. If navigation still prints an old or malformed destination, use the Inlinks investigation to find its source. My technical SEO audit service covers these response and internal-link checks together.

Video lessons: SEO course session 9 · SEO course session 10. The videos are in Arabic.