need to redirect non www to www Wordpress site

I am new to digital ocean today i moved my wordpress site from godaddy to digital ocean, I added www version domain address in digital ocean… If i try to open non www version of the domain it gives “This site can’t be reached” error… May i know how to fix this


Submit an 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.