Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya,
To redirect a non-www domain name to a www domain in a WordPress setup on a LAMP stack, you’d typically make modifications to the Apache configuration or to the .htaccess file within your WordPress directory.
I’ll recommend adding the 301 Redirect in your .htaccess file rather than in the Apache configuration.
Backup: Before making any changes, it’s always a good practice to backup your current .htaccess file.
Access .htaccess File: Navigate to the root directory of your WordPress installation, where you should find the .htaccess file.
cd /path/to/your/wordpress/directory
Open the .htaccess file
sudo nano .htaccess
.htaccess file, add the following lines:RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Replace example.com with your domain name.
service apache2 restart
Settings > General.www.Hello @mushfiq
The DNS seems sorted, so the only thing left to do is to handle the redirect itself. In Apache, this mostly happens in the .htaccess file, but you also need to ensure that Mod Rewrite is enabled.
First, to enable the mod_rewrite module you need this command:
- sudo a2enmod rewrite
With the Rewrite module enabled, we can configure Apache with redirect rules using .htaccess files.
You can use the .htaccess file rule provided by KFSys.
Hope that this helps