Opened 5 years ago

Closed 5 years ago

#4165 closed defect (bug) (fixed)

Arbitrary subdomains should 301, not 302

Reported by: jonoaldersonwp's profile jonoaldersonwp Owned by:
Milestone: Priority: low
Component: General Keywords: seo

Description and similar execute a 302 redirect to This should be a 301.

Change History (5)

#1 @tobifjellner
5 years ago

We do create, now and then, legitimate sites, for instance when new languages are added. Is there any risk that searchbots remember previous 301 and later "blacklist" such links from being indexed?

#2 @jonoaldersonwp
5 years ago

Good point!

Ideally, invalid subdomain requests should 404, but, that'd create a bunch of different problems for us.

Bots should update pretty quickly (as the subdomains discover links). No 'blacklist' as such.
Browsers which cache 301s shouldn't hold onto them for ages, either, so we should be okay!

#3 @dd32
5 years ago

302 Temporary Redirect seems correct to me considering something may exist there in the future.

Can you expand upon why or what (other than this ticket..) is linking to random subdomains that it does become a problem?

#4 @jonoaldersonwp
5 years ago

Gah. Just wrote, then lost, a long explanation. Thanks, Chrome.

The short version is:

  • Things which don't/won't exist should return a 404, not a redirect, so we're already in weird territory - but I think that the wildcard redirect is a better user experience, and this beats the strict standards argument.
  • 99.99% of the possible valid subdomains won't ever exist, and, we'll lose more value from having those be 'wrong' than we'll get from minute extra velocity of a new site un-301'ing.
  • Most significantly, 302 redirects don't pass equity, so:
    • Value from links doesn't pass through them, so we lose any (minor) value from old/redirected subdomains.
    • Given this, it's possible to index subdomains, accidentally or maliciously. i.e., there's nothing stopping me from getting into the index, and causing a marketing headache.
  • 302s are bad.

#5 @dd32
5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r14866-dotorg

Note: See TracTickets for help on using tickets.