Creating a Domain Alias in Plesk Control Panel

This article will walk you through the process of creating a new Domain Alias using the Plesk control panel.

  1. Log in to Plesk
  2. Once logged in, click the ‘Home’ button in the left navigation frame.
  3. Click on the domain name you wish to create a domain alias for.
  4. Click on the ‘Domain Alias’ button. This will take you to the Domain Alias manager
  5. Add a new Domain Alias by clicking the corresponding button (Add Domain Alias).
  6. In the ‘Domain alias name’ field, enter the domain you wish to use an as alias. (ie: If you entered domain.com, domain.com would take you to the domain listed on your account.)
  7. Check the ‘Mail’ and ‘Web’ checkboxes to use this alias for receiving email and web service.
    • Selecting the ‘Web’ checkbox is necessary for your website to appear in a browser.
    • Selecting the ‘Mail’ checkbox will redirect email to the addresses specified on your domain. For example, if you create the domain alias ‘domainalias.com’ and your hosted domain is ‘domain.com,’ all email sent to you@domainalias.com will be sent to you@domain.com. You must have an email account set up for your hosted domain in order for mail to be redirected.
  8. Click the ‘OK’ button to create the domain alias.

After completing the steps above you should have a new Domain Alias listed on the Plesk ‘Domain Alias’ page.

Sample code for Active Server Component (ASPMail)

Every HamaraHost.com Windows Web Hosting package comes with the ASPMail component, which allows you to send SMTP mail directly from a Web page.

You can easily customise our sample script and put it up on your website. You would, however, need to change the Email Address in the field Mailer.FromAddress to any Email Address on the Domain on which you are
incorporating the script. For example, if your Domain Name is abc.com, then you need to define the Email Address as user@abc.com. This Email Address need not be existing on the Mail Server of abc.com, however, the domain name in the Mailer.FromAddress field has to be yours. Thus, you may use an Email Address like Do_Not_reply@abc.com as the Mailer.FromAddress.

The Email Address in the Mailer.AddRecipient field needs to be changed to your Email Address, where you wish to receive Emails submitted through the web page.

Sample Script

<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Testing"
Mailer.FromAddress= "user@abc.com"
Mailer.RemoteHost = "localhost"
Mailer.AddRecipient "Testing User", "youremail"
Mailer.Subject = "Testing"
Mailer.BodyText = "Testing"
if Mailer.SendMail then
Response.Write "Mail sent..."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
%>

Accessing / Managing your Plesk control panel

Using the IP Address to login into your Plesk Windows Hosting package

  1. Open your web browser. In the Address Bar type http://Your-Plesk-Panel-IP:8880/ and press Enter.
  2. In your Plesk login screen, type your domain name in the Login field and the password provided by HamaraHost.com in the Password field.
  3. If you login for the first time, select the language for your Control Panel from the Interface language drop-down box.
  4. Click Log In.

Using the Domain Name to login into your Plesk Windows Hosting package

  1. Open your web browser. In the Address Bar type the URL of your Plesk Panel and press Enter.

    The URL is of the form http://domain-name.com:8880/.

    Example: Your Plesk login URL for your domain name example.com is http://example.com:8880/

  2. In your Plesk login screen, type your domain name in the Login field and password provided to you by HamaraHost.com in the Password field.
  3. If you login for the first time, select the language for your Control Panel from the Interface language drop-down box.
  4. Click Log In.

Download Plesk-9.5-Domain-Administrators-Guide to find details regarding your Plesk Control Panel.

Sample code for using CDO in ASP

Originally known as Active Messaging, the Collaboration Data Objects (CDO) library allows users to send mails through ASP Scripts.

Collaboration Data Objects (CDO) is Microsoft’s technology for building messaging or collaboration applications or adding these capabilities to existing applications. Part of the Microsoft Exchange Server product, CDO has evolved from what Microsoft formerly called Object Linking and Embedding Messaging and, more recently, Active Messaging.

You can use the sample script provided by HamaraHost.com and tweak it a bit to your requirements, to accept feedback from your website visitors and get the results emailed to you.

You would need to change the Email Address in the field myMail.From to any Email Address on the domain name on which you are incorporating the script.

Example:

If your Domain Name is abc.com, then you would define the From Email Address as some-name@abc.com. This Email Address need not be existing on the Mail Server of abc.com, however, the domain name in the myMail.From field has to be yours. You may use an Email Address such as Do_Not_reply@abc.com.

The Email Address in the myMail.To field needs to be changed to your Email Address, where you wish to receive Emails submitted through the form.

Sample Script

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="something@domainname.com"
myMail.To="xyz@abc.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver")="localhost"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
myMail.Configuration.Fields.Update
myMail.Send
%>

Note

The body of the mail should not have bare linefeeds (\n). If a bare linefeed is detected, the SMTP service of Microsoft IIS6 (the Web Server running on HamaraHost.com‘s Windows servers) will stop delivering any mail and the mails will get struck in the SMTP queue. This is because Microsoft IIS6 strictly follows Internet e-mail standards; and these standards forbid the presence of bare linefeed characters in e-mail messages.

Example:

myMail.TextBody="Thank you for contacting us. We shall get back to you shortly.\n
Kind regards\n
abc.com"

In the above case, bare linefeeds (\n) are being used. Instead of \n, you need to use \r\n (carriage-return, line-feed). Hence, the correct usage would be:

myMail.TextBody="Thank you for contacting us. We shall get back to you shortly.\r\n
Kind regards\r\n
abc.com"

Sample code for ASPSmartUpload component

ASPSmartUpload is an Active Server component which enables an ASP application to accept, save and manipulate files uploaded through a browser. The files are uploaded via a HTML POST form with one or more <INPUT TYPE=FILE> tags. The <FORM> tag must contain the attribute ENCTYPE=”multipart/form-data”. All HamaraHost.com Windows Hosting packages have support enabled for ASPSmartUpload component. You can use the sample script provided below and tweak it a bit to suit your requirements.

Upload Script (Upload.asp)

<%
// Variables

Dim mySmartUpload
Dim intCount

// Object creation

Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

// Upload

mySmartUpload.Upload

// Save the files in a folder on the web server

intCount = mySmartUpload.Save("C:\WHB\Sites\yourdomainname.com\datafiles")

// Display the number of files uploaded

Response.Write(intCount & " file(s) uploaded to C:\WHB\Sites\yourdomainname.com\datafiles")
%>

HTML form for uploading up to 3 files

<HTML>
<BODY BGCOLOR="#FFFFFF">
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="Upload.asp">
<INPUT TYPE="FILE" NAME="FILE1" SIZE="50"><BR>
<INPUT TYPE="FILE" NAME="FILE2" SIZE="50"><BR>
<INPUT TYPE="FILE" NAME="FILE3" SIZE="50"><BR>
<INPUT TYPE="SUBMIT" VALUE="Upload!">
</FORM>
</BODY>
</HTML>

Sample code for ASPUpload component

ASPUpload is an Active Server component which enables an ASP application to accept, save and manipulate files uploaded with a browser. The files are uploaded via an HTML POST form with one or more <INPUT TYPE=FILE> tags. The <FORM> tag must contain the attribute ENCTYPE=”multipart/form-data”. All HamaraHost.com Windows Hosting packages have support enabled for ASPUpload component. You can use the sample script provided below and tweak it a bit to suit your requirements.

Upload Script (Upload.asp)

<%
Set Upload = Server.CreateObject("Persits.Upload")
Count = Upload.Save("C:\WHB\Sites\yourdomainname.com\datafiles")
Response.Write Count & " file(s) uploaded to C:\WHB\Sites\yourdomainname.com\datafiles"
%>

HTML form for uploading up to 3 files

<HTML>
<BODY BGCOLOR="#FFFFFF">
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="Upload.asp">
<INPUT TYPE="FILE" NAME="FILE1" SIZE="50"><BR>
<INPUT TYPE="FILE" NAME="FILE2" SIZE="50"><BR>
<INPUT TYPE="FILE" NAME="FILE3" SIZE="50"><BR>
<INPUT TYPE="SUBMIT" VALUE="Upload!">
</FORM>
</BODY>
</HTML>

How do I set up FTP access to my domain in Plesk?

1. Log into Plesk at https://your-domain-name:8443 as admin (replace your-domain-name with your ip or domain name)

2. Click on domains link (on the left hand side)

3. Click on your domain

4. click on Setup

5. Scroll down to Account Preferences where you will see a section to enter a username for ftp login, below that you can set or reset your ftp login password

6. Press ok to save this info

You will now be able to access your ftp from within a browser such as Internet Explorer -ftp://username:password@your-domain-name

Replace username with your username and password with the password you set, and replace the your-domain-name with your ip or real domain name.

You can alternatively access it using an ftp client application, such as Cute ftp, FileZilla or CoreFTP.