SyliusRedirectPlugin icon indicating copy to clipboard operation
SyliusRedirectPlugin copied to clipboard

Remove the permanent property?

Open loevgaard opened this issue 4 years ago • 3 comments

Right now you can create two kinds of redirects: A permanent (301) and a temporary (302). My suggestion is to remove the ability to choose and instead make the 301 redirect the way to go.

I have created tons of redirects in my life during migrations of products etc. I have never in my life created a temporary redirect. Also you would never create a temporary redirect for SEO purposes. That would always be a permanent.

According the this article from Yoast a 302 redirect that is active for too long will be treated as a 301. This has the implication that in theory we should probably have an expiry date when creating a temporary (302) redirect. That will just add to the complexity of this plugin.

Removing the permanent/temporary option would also open up for this issue: https://github.com/Setono/SyliusRedirectPlugin/issues/62 which in turn would lower the complexity of the plugin.

Any thoughts / feedback is very welcome.

loevgaard avatar Jan 02 '21 15:01 loevgaard

I also can't remember when I used a 302 unless it's for a specific migration. So I think it makes sense to me.

stefandoorn avatar Jan 04 '21 08:01 stefandoorn

How long is too long? If a product is out of stock indefinitely, you may want to set up a temporary redirect to an alternative. That is the only use case I can think of.

veloxy avatar Aug 16 '21 09:08 veloxy

Is that how people handle that use case, @veloxy? What I see around on stores is that stores still show the old product, but tell the user that they can get a similar product on another URL or they do a 301 redirect to begin with.

loevgaard avatar Mar 16 '23 20:03 loevgaard