What is Email Forwarding and Why Do You Need It?
Imagine you have an online business and want customers to contact you via info@yourdomain.com, but you prefer all messages to be collected in your personal inbox (yourname@gmail.com or contact@yourdomain.com). This is exactly what email forwarding does: any email sent to a specific address is automatically transferred to the destination address you have designated.
Email forwarding is not just a simple tool; it is a solution for organizing communications, separating team tasks, and maintaining a professional brand identity. Instead of checking multiple separate inboxes, you can centralize all messages in one place. In this article, you will practically learn how to create alias addresses, configure forwarding on your domain, and troubleshoot common issues.
The Difference Between an Alias Address and Email Forwarding
Many users mistakenly consider these two terms synonymous, but there is a subtle difference:
- Email Alias: An additional address connected to a real mailbox. For example,
sales@yourdomain.comis an alias for theadmin@yourdomain.commailbox. Messages are stored in the same primary mailbox, and you can reply with thesales@identity. - Email Forwarding: Sends the message to an external address (e.g., Gmail or Yahoo). In this case, a copy of the message is not kept on the origin server (unless specific settings are applied), and replies are sent from the destination address.
In practice, many email service providers combine these two. For example, in cPanel, when you create a Forwarder, you can specify whether a copy should remain in the local mailbox or not. In Google Workspace, you can also configure an alias to forward outside the organization.
Creating an Alias Address in cPanel and DirectAdmin
If you have shared hosting, you are likely using cPanel or DirectAdmin. The steps for creating an alias address are similar in both control panels.
In cPanel
- Log in to cPanel and find the Email section.
- Click on Forwarders.
- Select the Add Forwarder option.
- In the Address to Forward field, enter the alias address (e.g.,
info). - In the Destination Email field, enter the destination address (e.g.,
yourname@gmail.com). - Check the Discard local copy option if you do not want a copy to remain on the server; otherwise, leave it unchecked.
- Click on Add Forwarder.
Now, if an email is sent to info@yourdomain.com, it will be automatically transferred to your Gmail.
In DirectAdmin
- Log in to DirectAdmin and open the Email Manager section.
- Click on Forwarders.
- Click on the Create Forwarder option.
- Enter the source and destination addresses and click on Create.
Important note: If you are creating an alias for a domain that is not hosted on your server (e.g., a domain where you only manage DNS), you must ensure the domain's MX record points to your mail server.
Email Forwarding Using DNS and MX Records
Sometimes you want to perform forwarding without having a full mail server. In this case, you can use third-party forwarding services or configure DNS records to route emails to a forwarding service.
The MX (Mail Exchange) record determines which server receives emails for a domain. If you want forwarding to occur, you must point the MX record to the server that manages the forwarding. For example, if you use Cloudflare Email Routing, you need to change the MX record to route1.mx.cloudflare.net.
Example DNS records for forwarding with Cloudflare:
MX priority=10 route1.mx.cloudflare.net
MX priority=20 route2.mx.cloudflare.net
TXT v=spf1 include:_spf.mx.cloudflare.net ~all
After changing the MX record, you need to define the forwarding addresses in the Cloudflare panel. This method has a significant advantage: you do not need to purchase email hosting, and you can use your domain to receive emails while all messages are forwarded to Gmail or any other service.
Common Error: Not Setting Up SPF
One of the most common issues after forwarding is emails landing in spam. The reason is usually the lack of an SPF record. SPF tells the destination server which servers are authorized to send emails for your domain. If you have set up forwarding but have not updated SPF, forwarded emails may be identified as spoofed.
To fix this issue, check your domain's SPF record. A simple example:
v=spf1 include:_spf.google.com include:_spf.mx.cloudflare.net ~all
This record allows Google and Cloudflare servers to send emails on behalf of your domain. If you use another service, add the corresponding include.
Email Forwarding on Virtual Servers (VPS) with Postfix
If you have a virtual server (VPS) and want to configure forwarding at the server level, you can use Postfix. This method is suitable for those who have full control over their server.
The forwarding configuration file in Postfix is usually located at /etc/postfix/virtual. For each address, add a line:
info@yourdomain.com yourname@gmail.com
sales@yourdomain.com yourname@outlook.com
Then run the following commands:
postmap /etc/postfix/virtual
systemctl reload postfix
If you want all emails for a domain to be forwarded to one address, use the following pattern:
@yourdomain.com yourname@gmail.com
This is especially useful for domains that are only used for receiving emails and you do not want to write a separate line for each address.
Troubleshooting: Why Isn't Forwarding Working?
If you have configured forwarding but the email is not reaching the destination, check the following:
- MX Record: Make sure the domain's MX record points to your mail server. You can check this with the command
dig MX yourdomain.com. - Virtual File: If you are using Postfix, ensure you have processed the
virtualfile withpostmap. - Spam Filter: The forwarded email may be in the destination's spam folder. Check this.
- Forwarding Limits: Some services (like Gmail) limit automatic forwarding. If the email volume is high, forwarding may be stopped.
Creating Departmental Addresses Like info and sales with Forwarding
One of the main uses of email forwarding is creating departmental addresses. Instead of purchasing a separate mailbox for each department, you can create alias addresses and forward them to primary mailboxes.
For example, suppose you have three departments: sales, support, and management. You can create these addresses:
sales@yourdomain.com→ forward toali@yourdomain.comsupport@yourdomain.com→ forward toreza@yourdomain.cominfo@yourdomain.com→ forward toadmin@yourdomain.com
This has many advantages:
- Cost Savings: Instead of purchasing multiple mailboxes, you only have one primary mailbox.
- Flexibility: If a team member leaves, you only need to change the forwarding to the new address; no need to create a new mailbox.
- Better Organization: You can use email filters in the destination service to automatically label messages for each department.
For example, in Gmail, you can create a filter that labels emails sent to sales@yourdomain.com with the "Sales" label. This way, all messages are in one inbox but clearly separated.
Email Forwarding in Cloud Services and Hosting
Many hosting services offer email forwarding as a standard feature. If you use shared hosting, you can usually configure forwarding through the control panel in a few minutes. However, if you need more advanced forwarding (such as conditional forwarding or forwarding with header preservation), you may need a more specialized service.
ServerNet, as a provider of hosting services and cloud infrastructure, enables email management and forwarding on various platforms. Depending on your needs, you can use shared hosting with cPanel or a virtual server with Postfix. Choosing the right method depends on email volume, the number of addresses, and the level of control you require.
Advanced Tips for Email Forwarding
Forwarding with Header Preservation (SRS)
One of the problems with traditional forwarding is that the Return-Path header changes, which may cause SPF failure. The modern solution is to use SRS (Sender Rewriting Scheme). If you are using Postfix, you can install the postfix-srs package:
apt install postfix-srs
Then add the following settings to the main.cf file:
sender_canonical_maps = tcp:localhost:10001
sender_canonical_classes = envelope_sender
SRS prevents forwarded emails from being identified as spam and improves deliverability.
Multiple Forwarding
Sometimes an email needs to be forwarded to multiple addresses. In cPanel, you can create multiple forwarders for one address. In Postfix, simply add multiple lines to the virtual file:
info@yourdomain.com ali@gmail.com
info@yourdomain.com reza@outlook.com
In this case, both people will receive the email. This method is useful for teams where all members need to be informed of correspondence.
Conclusion
Email forwarding is a simple yet powerful tool that allows you to create multiple addresses, organize communications, and reduce costs. Whether you use shared hosting or a virtual server, there are various methods to implement forwarding. The key point is to correctly configure DNS and SPF settings so your emails do not end up in spam.
If you are just starting out, I suggest beginning with a simple alias address in cPanel or DirectAdmin, and after ensuring it works correctly, move on to more advanced methods. Email forwarding, when properly configured, is one of those tools that you will wonder how you managed without it.