Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kfirba's avatar
Level 50

Bug: www.laracasts.com won't redirect to laracasts.com resulting in session errors

Hello :)

I've just noticed that if I access some video on laracasts with the www prefix, the site won't redirect me to the non-www version and will deem me as a guest. If you access www.laracasts.com then sure, you will get redirected. However, when you try to access something like https://www.laracasts.com/lessons/foreign-key-constraints it will keep you with the www prefix.

0 likes
3 replies
phildawson's avatar

Good spot, yeah the redirect is just on the http and the https has no redirect at all.

The guest thing is a Laravel thing rather than a Laracasts specific thing if you leave domain as null in config.session it will use the current domain so www.laracasts.com and laracasts.com are different cookies. The nginx redirect to non-www on https would resolve that issue though.

kfirba's avatar
Level 50

By the way, the website is redirecting to a www domain from the links found in the FAQ page. You may want to fix them as-well.

Please or to participate in this conversation.