How do I set up a custom domain using Script Forwarding?
Normally when you set up a custom tracking domain, you would use one of these subdomain formats:
`http://yourdomain.com
http://www.yourdomain.com
http://track.yourdomain.com`
In some cases, you might want to use a slightly different style which uses a subdirectory:
`http://yourdomain.com/recommends/`
If you want to use `yourdomain.com` or a subdomain such as `track.yourdomain.com` as your tracking domain, you’ll want to set up your custom domain using the a CNAME DNS record, explained here:

|  | What is the recommended way to set up a custom domain?

If you want to use the `yourdomain.com/recommends/` subdirectory style, you’ll need to set up your tracking domain using Script Forwarding with your own server, and that set up process is explained below.
Caution: Unless you have a really good reason for using the subdirectory style, we recommend using the CNAME DNS method—it’s rock-solid, performs faster redirects, and will still deliver your clicks even if your own server goes down for any reason.
To use this Script Forwarding approach, just follow the steps in this video, or follow the written walkthrough below.

|  | Create a Custom Domain Using Script Forwarding

To set up your custom tracking domain using Script Forwarding, follow these step-by-step instructions :

1. |  | Set up a server Unless you already have your own server, you’ll need to sign up for a decent Linux VPS or cloud server plan with a dedicated IP address. Expect to pay no more than \$10-\$20 USD a month for this. You don’t absolutely need a dedicated IP address but it’ll help you get the best email deliverability possible if you’ll be running email campaigns from your server. All VPS and cloud server accounts should come with a dedicated IP address. We do NOT recommend using a cheap shared hosting plan. Shared hosting plans can lose clicks due to their overburdened servers, and can also cause visitors to click away from your offers before they see anything because pages pull up so slowly. Our advice—don’t risk it!

2. |  | Create your customized settings files We have a Setup Wizard to help you generate the custom files: Launch the Setup Wizard. The Setup Wizard will generate a compressed file called `$username.zip` that you can download.

3. |  | Upload the compressed file to a subdirectory in your hosting account. First create a new subdirectory on your domain, such as `yourdomain.com/recommends/`, then upload the file `$username.zip` to the directory. Once uploaded, use your file manager or FTP program to extract the `$username.zip` file. This should create two additional files: `htaccess` `index.php` If your file manager or FTP program can’t extract the file, you can extract the file before uploading, then separately upload the two files shown above.

4. |  | Rename the file named `htaccess` to `.htaccess` You simply need to rename the `htaccess` file so that it starts with a period (`.`). If for some reason you can’t add a period to the start of the filename, it’s most likely caused by a setting somewhere in your hosting account file manager. In this case, you’ll need to contact your hosting company and they’ll tell you how to change the filename.

5. |  | Add your new domain to your ClickMagick account using the Domain Manager which you can find in the Tools menu. Be sure to enter the full URL, including the subdirectory. For example, if you created the subdirectory `/recommends` and you uploaded your files there, the full tracking domain would be: `yourdomain.com/recommends` When you attempt to add your tracking domain to the Domain Manager, you may get an error saying that the domain can’t be found. Just read the error message and follow any instructions. When you create a new domain, it can take 1 to 24 hours for the domain to become active on the Internet. If you get an error when you try to add the domain to the Domain Manager, just wait a bit and try again.

That’s it, you’re done!
You’ll get all the benefits of a custom domain with a dedicated IP, and the script we provide will route all of your traffic through your ClickMagick account.
Troubleshooting
Problem #1:
The most common problem people run into when setting up custom domain Script Forwarding is an “Internal Server Error” when testing a tracking link using their new custom tracking domain.
This has nothing to do with ClickMagick, but rather it indicates that your server isn’t properly set up to use `.htaccess` files in the directory you uploaded the files to.
Unfortunately, this isn’t something we can help with from our end, so if you’re 100% positive you did step #4 above you’ll need to get help from your hosting company …
99 out of 100 times things will be set up properly by default, but in case you’re one of the unlucky few who have a non-standard Apache setup, please tell your hosting company the following:
“I’m trying to use `.htaccess` files in XYZ directory [the directory where you uploaded the files] but it’s not working. Can you take a look or let me know how to enable `.htaccess` files in this directory?”
Problem #2:
You’re trying to use your tracking domain without a link or rotator ID and you’re getting an error telling you that the ID is missing.
If you’re getting this error it simply means that you’re entering your custom domain without specifying a link or rotator ID. That doesn’t mean there is anything wrong with your custom domain.
For example, every time you create a new link, you will be asked to choose a unique Link ID to distinguish that link from all the others in your account. So, if you were to create a link with the Link ID `video`, you would reference that link using your custom domain like this:
`http://yourdomain.com/recommends/video`
If you forget to add the `/video` , you will be told that the “Link ID is missing from that URL.” That’s perfectly normal behavior and there is nothing wrong with your custom domain.
Tip: If you’re getting an error that is not explained here, every possible custom domain error that ClickMagik generates is explained in this FAQ:

|  | How do I troubleshoot my custom domain setup?