> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hitpayapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Domain

> Connect your own domain name to the HitPay Online Store

# HitPay Online Store Custom Domain Guide

Connecting your own custom domain to your online store is a crucial step in establishing a strong brand identity and creating a more professional online presence. This guide will walk you through the process of connecting your custom domain to your HitPay Online Store. Before you begin, ensure that you have already purchased a custom domain from a domain registrar service of your choice.

Please note that the steps outlined below may vary slightly depending on the domain registrar service you use.

## Steps to Setup

<Steps>
  <Step title="Log in to your HitPay Online Store admin panel">
    Access your HitPay dashboard using your credentials.
  </Step>

  <Step title="Navigate to Online Shop > Domain">
    Find the domain settings in your admin panel.
  </Step>

  <Step title="Enter your custom domain">
    Input your domain name in the provided field.
  </Step>

  <Step title="Modify DNS Records">
    Log in to your domain registrar account and access the DNS settings. You have two options for configuring your DNS records:

    ### Option 1: A and AAAA Records (Recommended)

    Create the following DNS records:

    ```
    # For root domain (example.com)
    Type: A
    Name: @ or leave empty
    Value: 137.66.35.46

    Type: AAAA
    Name: @ or leave empty
    Value: 2a09:8280:1::47:3e49:0

    # For subdomain (shop.example.com)
    Type: A
    Name: shop
    Value: 137.66.35.46

    Type: AAAA
    Name: shop
    Value: 2a09:8280:1::47:3e49:0
    ```

    ### Option 2: CNAME Record

    Alternatively, you can use a CNAME record:

    ```
    # For subdomain only (shop.example.com)
    Type: CNAME
    Name: shop
    Value: hitpay-store.fly.dev
    ```

    Note: CNAME records cannot be used for root domains (example.com).
  </Step>

  <Step title="Wait for DNS Propagation">
    DNS changes may take up to 48 hours to propagate across the internet. During this time, your custom domain may not be immediately accessible.
  </Step>
</Steps>

## Congratulations!

You have successfully connected your custom domain to your HitPay Online Store. Your online store will soon be accessible via your custom domain, providing a more professional and branded experience for your customers.

If you encounter any issues or have questions during this process, don't hesitate to reach out to HitPay customer support for assistance. They are here to help you make the most of your online store and custom domain integration.

Thank you for choosing HitPay Online Store for your e-commerce needs!

## FAQs

<AccordionGroup>
  <Accordion title="Can I use only my subdomain like `shop.mydomain.com` for the store and keep my existing website intact?">
    Yes, you can use a subdomain like `shop.mydomain.com` exclusively for your HitPay store while keeping your existing website intact. To do this, follow these steps:

    1. Log in to your domain registrar account (e.g., GoDaddy, Namecheap, etc.).
    2. Find the option to manage your DNS settings.
    3. Add the required DNS records:
       * Option 1 (Recommended): Add A and AAAA records
         ```
         Type: A
         Name: shop
         Value: 137.66.35.46

         Type: AAAA
         Name: shop
         Value: 2a09:8280:1::47:3e49:0
         ```
       * Option 2: Add CNAME record
         ```
         Type: CNAME
         Name: shop
         Value: hitpay-store.fly.dev
         ```
    4. Save your DNS changes.
       By creating a CNAME record, you're directing traffic from your subdomain to your HitPay store, ensuring that it functions as a separate online store while leaving your main website unaffected. Customers can access your store by entering `shop.mydomain.com`, and your existing website remains intact.
       Keep in mind that DNS changes may take some time to propagate across the internet, so it may not be immediately accessible. Please be patient during this process.
  </Accordion>
</AccordionGroup>
