Not sure if this is a bug report or a feature request yet.

A SEO agency that one of our customers is using is trying to use Domain Redirect to set up some wildcard redirects within Drupal. However the status response for all the redirects is 302, which is not the 'Default redirect status' that we have set in /admin/config/search/redirect/settings.

I can see in DomainRedirectRequestSubscriberTest.php that 302 is the status code that we expect, but would it not make more sense to use the 'Default redirect status' ?

Not being able to use a 301 status with Domain Redirect limits its use for an SEO point of view.

Comments

Phil Wolstenholme created an issue. See original summary.

berdir’s picture

No reason, could possibly even hardcode 301, I guess 302 is just the default code and we didn't think about that.

Phil Wolstenholme’s picture

Issue summary: View changes
Phil Wolstenholme’s picture

Title: Domain Redirect using a 302 status instead of the Default redirect status. » Domain Redirect using a 302 status instead of the 'Default redirect status' set in config.
john cook’s picture

Status: Active » Needs review
StatusFileSize
new3.72 KB

I've created a patch to use default_status_code from redirect.settings configuration settings and updated the test appropriately.

I've also fixed some coding standards errors in the test as I was changing it.

  • Berdir committed e5ce97b on 8.x-1.x authored by John Cook
    Issue #2866748 by John Cook: Domain Redirect using a 302 status instead...
berdir’s picture

Status: Needs review » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.