0

I want to always force www in my nextjs project. I tried this in htaccess file but doesn't work. Anyone can help me ?

nicosha
  • 29
  • 2

1 Answers1

0

it seems it's not so much related to the next.js and it depends on the tools you're using for deploy.

for apache: https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-apache-on-ubuntu-14-04

for Nginx: Nginx no-www to www and www to no-www

Alireza Esfahani
  • 701
  • 7
  • 16