Question

How to set DNS to use cpanel email

Posted September 27, 2021 134 views
EmailDNSLaravel

I have a strong shared hosting plan from a company that provides unlimited email accounts but sadly I had some issues deploying a Laravel app on that plan because of the restrictions it has. now I want to use a VPS for my Laravel app but still want to use the cpanel email functionality on that plan to send and receive emails on the same domain that will host the Laravel app on the VPS but I really have no idea if it is possible and if it is then how should it set the DNS records to achieve that.
Also was not able to find any tutorial that tackles what I need to do.

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.

×
Submit an Answer
2 answers

Hello, @ShanS

If you want to set up a Laravel application on a DigitalOcean droplet all you need to do with the DNS is to update the A record of your domain name and point it to the IP address of your droplet.

The MX record that is responsible for the mail delivery will remain the same as per your wish, meaning that you’ll still use your cPanel plan to host your emails.

Regards,
Alex

Hi @ShanS,

You can do that with DigitalOcean.

First, let’s talk on how to create your Laravel Droplet. There are two possibilities which you can use -

  • Create the droplet and install Laravel on our own

  • Use the MarketPlace image of Laravel which installs everything for you.

If you want to create the droplet and manually install Laravel, I’ll recommend checking the following tutorial. It will help you do it while installing all the necessary software it’s needed.

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-laravel-with-nginx-on-ubuntu-20-04

Now, if you want to skip all the stuff that need to be done and just have it prepared for you, I’ll recommend using the Marketplace here:

https://marketplace.digitalocean.com/apps/laravel

What it does is, it installs Laravel and all the software needed preparing it for you to just use it.

DNS
As for the DNS, all you need to do is change the A record of your Droplet once your domain is ready to your Droplet’s IP address.

by Erika Heidi
Laravel is an open-source PHP framework that provides a set of tools and resources to build modern PHP applications. With a complete ecosystem leveraging its built-in features, Laravel's popularity has grown rapidly in the past few years, with many developers adopting it as their framework of choice for a streamlined development process. In this guide, you'll install and configure a new Laravel application with Nginx and MySQL 8 on an Ubuntu 20.04 server.