1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #2184 wontfix

Support CNAMEs for repositories (BB-3655)

Igor Tkach
created an issue

Currently, CNAME support is only for user/team accounts. This should be expanded to support repositories directly. This should support both regular repositories and the static hosted repositories (as documented here).

Comments (119)

  1. Charles McLaughlin

    Technically you're not supposed to add CNAMEs in the root of your DNS. If you run your own DNS service you might be able to do it. However, I've never seen any host DNS providers allow it. I don't think there's anything in Bitbucket that would prevent you from doing this.

  2. Chris Deezahyn
    • changed status to open

    Hi, I think he was referring to the same function of what Github Pages already offer, see link: http://pages.github.com/#custom_domains

    In GitHub's implementation, you just need to add a file CNAME, that contains your custom domain. Also take note, it was mention for subdomains is to use CNAME, while if you want to use your root, then you'll use A record. But this is irrelevant to what you are pointing out.

    So I just want to bring this up again, if there's a way to use your custom domain and/or subdomain to point to bitbucket page (your-user-name.bitbucket.org).

    This ability is supported by Github pages already, as per link: http://pages.github.com/#custom_domains

  3. Dylan Etkin
    • removed assignee

    Hi Igor,

    Thanks for the suggestion.

    To be honest I don't think we will get to this too soon (although our sys-admin is keen to try for 20% or FedEx).



  4. Anonymous

    This is a pretty important feature you're lacking and it is losing you users to GitHub... Definitely needs implemented.

  5. David Hund

    I don't understand why BB seems so reluctant to implement this. It is a very popular feature of GH and — when implemented — could draw in many people currently looking at GH static-page hosting.

  6. Peter Bex

    I'd have loved to host my site at bitbucket, but it looks like I'm going to have to look at other options. I'd like to avoid github so that probably means a VPS or shared hosting (ugh!)

    Having cname aliases for <username>.bitbucket.org would be great to have and wouldn't break compatibility with having a user page there: If there's no static site repo named <username>.bitbucket.org, just show the user overview page, otherwise show the static site.

  7. ostree

    i second that, i would also like to see this feature implemented. when only this feature will appear at BB, i'll disappear from GH for good with all my stuff...and i really hope that it will be soon. i would like to finally have all of my professional and private repositories in one place - the place which I like the most ;)

  8. James Darbyshire

    +1 here too - I would move my stuff away from GH and back to BB if this was possible. It can't be that hard to implement. It would also open up the road for Jekyll and Octopress etc..

  9. Tim Sally

    Thanks for looking into that David. Let's go ahead and see if we can make this issue more accurately reflect what I believe to be a large amount of support for this feature. I'll ask the other people I know that use Bitbucket and Github if this is something that they think would make Bitbucket more attractive.

  10. Viktor Ahlqvist

    This really needs to be implemented. I know several users who has migrated to Github to support hosting of Jekyll/Octopress sites, and I'm currently moving my stuff to Github as well.

  11. Pras Velagapudi

    Joah, I believe this issue is about hosting a static website on bitbucket and having your custom domain point to it, not redirecting people from your bitbucket page to another website hosted elsewhere.

    As far as I know, there is still no way to do the former.

  12. David Roberts

    +1 Yeah, moving some stuff to Github tonight or tomorrow. I really should pay for some services, but I'll be honest, it's just a blog and I'm a bit cheap. Corporate is paying for some Github stuff anyway.

  13. Shane Spencer

    For Teams I'd love to have repository teamname/teamname.bitbucket.org respond to teamname.com (as an example) rather than bringing me to the team page with a list of repos.

    Love to make it simple as well and have teamname/teamname.com respond to teamname.com if that is te teams CNAME.

  14. Justen Stepka

    Official update:

    At this time we do not have an estimate for when this feature will be implemented. Our focus for the short to medium term, will be to provide SSO and better user management with our OnDemand JIRA and Confluence products. I would estimate that the SSO integration and bi-directional oAuth integration between Bitbucket / JIRA / Confluence / Bamboo will take us well into 2014, at which time we will re-evaluate this decision.

    Cheers, Justen -- Bitbucket product manager

  15. Mike Schinkel

    This would be a huge benefit, really needed.

    Minimally it would be great if we could at least have an HTML view of .HTML files for formatting requirements that can't be format with your markdown processor, so we can include viewable documentation (and yes I know it can be a security hole if Javascript is included, but not if you strip out the Javascript; then it's not a security hole.)

  16. Shane Spencer

    I'd love to give advice on implementing this if possible. Specifically using X-Accel-Redirect and some very mild changes to the repository hooks.

    There's also a VERY unique solution that ReadTheDocs uses that would take very little time to implement and not even require CNAME files.

    Please reach out to me on this if you can.

  17. Murali Paluru

    I have been using bitbucket for quite some time. Today I was planning to host static website for blogging purposes using a custom domain. I figured it's not possible. Moving to github :-(

    Please implement this feature. Lot of people have already requested this and that too over an year back.

  18. Chris Krycho

    Voted. But note: I'm using GitHub Pages instead, precisely because of this, and accordingly if it comes down to wanting to pay for one or the other at this point, I'm much more likely to pay for GitHub.

  19. Tom van Neerijnen

    I don't work for Atlassian so this comes with exactly no guarantees of uptime or support from me or, obviously, Atlassian, but here's a stop-gap solution for those looking for repo cnames: https://bitbucket.org/ruppells/bbpages/overview

    If I get too much traffic thru it tho it'll turn itself off so if anyone thinks they'll be hosting anything traffic heavy let me know first.

    If you find any problems I like pull requests but I'll look at issues against the repo too.

  20. Ian Stewart

    I am a GitHub user who just resurrected my Bitbucket account in order to deploy my blog/home site. I rebuilt my GitHub Pages project to deploy static HTML to Bitbucket, only to find custom domain names aren't supported. Highly disappointed, I am returning to GitHub exclusively.

  21. Lucas Connors

    For those of us Bitbucket lovers that are still waiting on this feature, here are some straightforward steps on how to easily transfer your Bitbucket-hosted website to Github:

    1. Create a Github account
    2. Create a repository with the name username.github.io where username is your Github username
    3. Navigate to the repo on your local machine in the terminal and do a git pull
    4. git remote rm origin (note that your current site at username.bitbucket.org will remain online)
    5. git remote add origin git@github.com:username/username.github.io.git
    6. git push -u origin master
    7. Verify that your site is now on Github by visiting username.github.io (Github says this may take up to 10 minutes to take effect)
    8. Create a file CNAME at the root of your repository containing a single line with your domain name (ex. example.com)
    9. Update your DNS A records to point to and
    10. Update your DNS CNAME records to point to username.github.io
    11. Verify that your domain name now points to your Github Page (this may take some time for the information to propagate through domain name servers)
    12. Delete your repository from Bitbucket (optional)

    And once Atlassian does implement this feature, moving your repo back should be just as easy. :)

  22. Malena Andrade

    Oh man this totally sucks. I just spent last two days waiting to configure custom domain to realize there is an issue on this for the past 4 years. Seriously?!?! Sigh.. moving to github. Lucas Connors thanks so much for detailed instructions on moving over :)

  23. iamstephen

    +1 CNAME for the static web hosting <username>.bitbucket.org would be really helpful! I dont see why there is only CNAME support for bitbucket profiles. Why would I want to cname that?

  24. Azizur Rahman

    Four and half years on and no official update on this. This makes me wonder if Atlassian value all the developers like Github does.

    Than again Atlassian has different business model. Very likely this is not even a team working on bitbucket these days.

  25. Chris Krycho

    Here’s the short answer, made obvious by this and any number of other issues: Atlassian’s not in the least interested in responding to actual expressed customer demand. Why not, I have no idea. But—much as it makes me sad, given my love for Mercurial and Google Code’s recent shuttering—I’m going to be migrating all my repositories from here to a mix of GitHub (and maybe GitLab if I need more private repos for things that don’t make money). Both of those services are clearly run by companies that listen closely to their users; Bitbucket (and JIRA and the rest of the suite) may be all right for massive enterprise operations, but for small businesses, they’re a bad bargain. I’m out. Adios.

  26. Kaleb Elwert

    One of the main reasons for CNAME deprecation is that of security. CNAME traffic is not encrypted and it is not a reasonable option to obtain an SSL certificate for every CNAME, as we do not actually own those domain. All traffic over CNAMEs is in plain text. We made Bitbucket HTTPS only years ago and from that point onwards we should have deprecated CNAMEs.

    Removing our current CNAME support is the current course of action, but this is something (in particular with hosted static repos) that we would like to revisit in the future.

  27. Swyter

    Right now Bitbucket seems to have just an EV certificate for (www.)?bitbucket.org, as there isn't normally wildcard support for these. For hosted static repos I guess they would have to get another one for *.bitbucket.org.

    Having to create an account for every new static site is kind of awkward. And TLS support would be a cool extra, at least without custom domain. I like Hg better, but I'm willing to move my projects to a Git-based server just to get around this.

  28. Marcus Bertrand [Atlassian] staff

    As noted above, we have decided to end support for the CNAME feature for Accounts, and will not be working on a similar feature for Repositories (while showing the Bitbucket login/UI).

    In the future, we may consider allowing CNAMEs for static hosted repositories. If you would be interested in such a feature, please vote on it here.

    As this particular issue conflated those two feature requests, we will be closing this issue as won't fix to help disambiguate the users who were looking for static hosting via CNAMEs and the users who were looking to have a CNAME load the Bitbucket UI under their domain. We encourage you to vote on the new static hosted CNAME feature if this is something you wish to see on Bitbucket in the future.

    As always, if you have any specific questions or concerns, please feel free to raise them directly to us at support@bitbucket.org.

  29. Rich Schmitt

    I really want this feature. Or something similar. My code is hosted on bitbucket and is commented through doxygen. I want the doxygen pages to be private and only visible to folks who have access to the code. Right now, the only way I can do that is to load up the doxygen output into the repo, and recommend that folks clone the repo and run a browser over the doxygen directory. My gut tells me this is not that difficult but that's without knowing any the details of how the bitbucket site is implemented. Perhaps another menu item other then wiki that directs a browser to a directory within the repo.

    Another option would be to support doxygen within bitbucket. Have bitbucket automatically generate doxygen html output from the code in a repository. I could understand that this is a bit more complicated.

    There were other comments on the web about using a converter from latex to md but that doesn't translate links. Which effectively makes the translator useless.

    I would pay for this option. It would allow me to present a portal to our product.

  30. Log in to comment