Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

CNAME for bitbucket cloud

I am migrating the project from Bitbucket server to Bitbucket Cloud

our url for Bitbucket Server is https://bitbucket.example.com/

now the url become https://bitbucket.org/example

Is it possible to create a CNAME for bitbucket cloud?

1 answer

1 accepted

0 votes
Answer accepted
jredmond Atlassian Team Dec 16, 2019

You should be able to set up a CNAME for bitbucket.org in any domain you manage, but it may be more trouble than it's worth.

  • It may cause a little bit of additional latency: the initial DNS lookup (for bitbucket.example.com) will trigger a second lookup (for bitbucket.org), and Bitbucket Cloud will then see the old host header (for HTTP) and issue a redirect to the correct one. (SSH doesn't care about host headers; as long as it gets an IP back from DNS, it'll connect to the right place and not get redirected.)
  • The CNAME will also not affect the rest of the path, so it won't add the `/example` to the request (for, um, example).
  • The CNAME will not change any ports specified. Bitbucket Server listens by default on ports 7990 and 7999, but Bitbucket Cloud uses standard ports 443 and 22 respectively for HTTPS and SSH (with the notable exception of altssh.bitbucket.org, which listens for SSH requests on port 443).
  • The API is different. Bitbucket Server exposes a lot more high-level server management endpoints, but Bitbucket Cloud does not. (You probably have root on the systems where you run BB Server, but you are absolutely not getting that on BB Cloud.) There are also some syntactic differences in the API and its default paths.
  • Finally, assuming the paths and ports and so forth are fine, Bitbucket's redirect will cause users to see a warning like `warning: redirecting to https://bitbucket.org/example/repo` on each push, pull, clone, or ls-remote operation that happens over HTTPS. This is harmless - most Git client software should handle the redirect without trouble - but because Git uses the term "warning" users may not respond calmly.

With all that in mind, and given Git's decentralized design, it may be best to announce a date for the authoritative version of a given repo to switch from BB Server to BB Cloud, and give people the proper new URL to use with `git remote set-url`.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,886 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you