the fast, reliable localhost tunneling solution


Using CNAMEs with PageKite

By Bjarni R. Einarsson 2016-07-11, 00:42

Not everybody wants a website with a name like SITE.pagekite.me, many already own their own domain names and would rather use those.

In fact, this is recommended - it provides a layer of abstraction and independence between your identity on-line and the PageKite Service. If you use a CNAME, you will more easily be able to move your website to some other solution or provider at a later date, if you so choose.

Obviously we hope you won't ever feel the need to do so, but having the freedom to choose is important.

How it's done

Let's assume you own domain.com and have a PageKite Service account named you.pagekite.me, and you want www.domain.com to be served over PageKite.

The recommended CNAME-based configuration would involve the following steps:

  1. Create domain.you.pagekite.me using this form
  2. Create a CNAME record for www.domain.com linking it to domain.you.pagekite.me
  3. Add www.domain.com to your PageKite account using this form
  4. Follow the instructions below to add the required back-ends to your PageKite configuration file.

Explanations

Step 1. is technically not required, you could also create a CNAME directly on you.pagekite.me. However, by using a separate name, you preserve the ability to later use the two names for different websites on different computers.

How exactly to go about step 2. varies depending on where you bought your domain name. We hope to provide more details on the following, if you can help please feel free to edit these pages or upload screenshots:

Steps 3. and 4 are required to integrate the new name into your PageKite configuration.

Limitations of CNAMEs

Note that if you own domain.com and receive e-mail on that domain, then you can not create a CNAME for the top level domain.com name.

This is due to technical details of how DNS and e-mail interact. Generally you can create a CNAME for any other name (www.domain.com or pagekite.domain.com or my.page.domain.com to name a few), just not for the top level name itself.

Configuring pagekite.py

Once the DNS records have been created and your PageKite account brought up to date, you need to reconfigure pagekite.py to know about your domain.

This usually requires adding two lines to your configuration file, which would look like this:

service_on=http:domain.you.pagekite.me:localhost:80:SECRET
service_on=http:www.domain.com:localhost:80:SECRET

(Older versions of pagekite.py used backend= instead.)

Both lines are needed, as the first will guarantee that the DNS records for domain.you.pagekite.me are kept up to date as your front-ends change, and the second takes care of actually registering and routing traffic for www.domain.com.

(Note that if you want to expose HTTPS or SSH servers you will need to add lines for those as well.)

Comments

  1. adolfo said on 2012-04-13, 18:40
    cool
    Permalink
  2. Mozart said on 2012-07-20, 15:36
    Where exactly do I need to put these lines?
    backend=http:domain.you.pagekite.me:localhost:80:SECRET
    backend=http:www.domain.com:localhost:80:SECRET

    Permalink
  3. Bjarni Rúnar Einarsson said on 2012-07-20, 15:41
    Please see https://pagekite.net/support/quicksta... for details on configuring pagekite.py.
    Permalink
  4. Mozart said on 2012-07-20, 20:20
    Thanks for your swift reply.
    I successfully ran
    pagekite.py --add 80 http:my.name.pagekite.me
    pagekite.py --add 443 https:my.name.pagekite.me

    But
    pagekite.py --add 80 http:my.domain.com
    pagekite.py --add 443 https:my.domain.com
    gives errors:
    .. !!! REJECTED: http:www.my.domain.com (Invalid account or shared secret)
    and does not creat a kite

    my.domain.com is listed as CNAME under my.name.pagekite.me in my account overview.

    Could you help me out again?
    Permalink
  5. Bjarni Rúnar Einarsson said on 2012-07-21, 22:57
    Actually, the main point of the link I sent was it describes where you can find your configuration file (.pagekite.rc or pagekite.cfg depending on your operating system). I think it's still necessary to edit it by hand for CNAME records, although I hope to correct that in a future release of the software. Sorry I wasn't more clear!
    Permalink
  6. Chad said on 2012-08-14, 17:49
    hey guys... after I attempt to edit this file on my Windows 2008 R2 server, I try to relaunch pagekite.py and it doesn't start up.

    Where in the config file do I add these lines?

    Are they tab delimited, or can I just copy/paste the code above and modify with my own info?

    Thanks
    Permalink
  7. Bjarni Rúnar Einarsson said on 2012-08-14, 19:45
    Spaces or tabs, either or both should be fine. Copy-paste probably works, but take care not to have duplicate definitions. Note that the --backend syntax has been replaced by --service_on in PageKite 0.5 - the old syntax still works (they are completely equivalent), but this can be a source of confusion as you may not realize that you have duplicate lines.
    Permalink
  8. Marty Ballard said on 2012-11-29, 03:11
    For step 2 above, if you went with hover.com, you'll need to add a new DNS with the following format:
    Hostname: www
    Record Type: CNAME
    Target Host: sitename.accountid.pagekite.me

    Permalink
  9. Nils said on 2013-01-30, 15:22
    i own the domain ownid.net and want to point it to my.pagekite.me domain. Following point 2 in the instructions above i entered the line "www IN CNAME t.pagekite.me" into the zonefile for ownid.net. Unfortuntly a "host www.ownid.net" now answers
    www.ownid.net is an alias for t.pagekite.me.ownid.net.
    t.pagekite.me.ownid.net has address 194.231.113.50

    what did i do wrong?
    Permalink
  10. name-cheap - CNAME (Alias) worked ! said on 2013-03-01, 18:22
    Hi all,

    great thing you put together - just what I was looking for - since 5 (!) days ... so YOU need better marketing (joke) - or I need better search-engine-handling ...

    However - I just bought a domain at NAME-CHEAP - and here is my aff-link - in case you wanna help me become rich:

    http://www.namecheap.com/?aff=46594

    HOW-TO CNAME @ NAME-CHEAP

    1: lets assume you bought " yourdomain.com " @ name-cheap.

    2: log in and click on that domain name

    3. scroll down a bit, left side is " Host-Managment", click on "All Hosts Records"

    4. first line: look at Hostname (@)

    4a. enter (IP-Address/URL): www.yourdomain.com
    4b. choose (Record Type): URL-Redirect
    4c. choose (TTL): 1800

    (This takes care for the redirection of (yourdomain.com) to (www.yourdomain.com)

    5. second line: look at Hostname (www)

    5a. enter (IP-Address/URL): your-name.pagekite.me
    5b. choose (Record Type): CNAME (Alias)
    5c. choose (TTL): 1800

    Thats it! --- you are all set and BOTH domains (yourdomain.com AND www.yourdomain.com) are pointing to

    your-name.pagekite.me

    Hope that helps,

    thanks for reading,

    Hans
    please do NOT forget to enter your CNAME url into the settings script ...
    Permalink
  11. Steve said on 2015-04-09, 04:52
    OMG, what I get for a week is only ".tk not a service domain"
    when I try to add my domain to pagekite.
    hosting website is freenom.com
    PLEASE HELP!
    Permalink
  12. Femi said on 2016-01-22, 13:38
    I cant seem to redirect the domain in 1and1 control panel. It keeps saying this url is invalid.
    Permalink
  13. Shaikh Amaan FM said on 2016-11-25, 16:44
    What is the pagekite's nameserver?
    Permalink
  14. brown clark said on 2017-01-31, 10:17
    Having trouble with duplicate files? just use "DuplicateFilesDeleter program"
    Permalink

Leave a comment

( (Please leave these blank: )

We use Gravatar for commenter's photos. Get your own, it's free!

Wiki

Links