URL Shortener Documentation

You can manage various menus across your site, including header and footer navigation, from the “admin > appearance > menu manager” page. Here, you can:

  • Add new menus or remove existing ones.
  • Change the position where a menu appears on the site.
  • Reorder menu items using drag and drop.
  • Add new menu items or remove existing ones.

The menu position option controls where on the site the menu will appear. For instance, selecting “Landing Navbar” will place the menu at the top of the landing page, while choosing “Footer” will display it in the site’s footer. The available menu positions will depend on the app you’re using.

Note: If multiple menus are assigned to the same position, only the first one will be displayed.

When adding menu items, you can choose from different destinations:

  • Link: Allows entering any custom URL, either from a third party or your own app. It should be a full URL, for example, “https://some-site.com”.
  • Route: For URLs from your own site. You can select from a list of suggested URLs or enter a custom one without the domain, for example, “login” to open the login page.
  • Custom page: Links to custom pages created from the “admin > custom pages” section.

Configuring PayPal

To receive payments via PayPal, follow these steps to obtain your PayPal API credentials:

  1. Go to https://developer.paypal.com, click “Log into Dashboard,” and log in with your regular PayPal account.
log into dashboard

2. Scroll down to “REST API Apps,” click “Create App,” enter any name for your app, and then click “Create.”

Scroll down to REST API Apps
  1. Once you’re on your app page, scroll down to “SANDBOX WEBHOOKS” and click “Add Webhook.”

In the “Webhook URL” field, enter “https://your-site.com/billing/paypal/webhook“, replacing “https://your-site.com” with the actual URL of your site. Select “All Events” and click “Save“.

Add Webhook

4. Your PayPal app is now created. Scroll up to “SANDBOX API CREDENTIALS,” copy the “Client ID,” “Secret,” and “Webhook ID,” then paste them into the corresponding fields on the “admin area > settings > billing” page of your site.

SANDBOX API CREDENTIALS
Webhook ID
Billing

Important: PayPal provides “sandbox” credentials for testing and “live” credentials for actual transactions. Ensure you enter the correct credentials in your site settings page and toggle “PayPal Test Mode” as needed for testing or live operations.

PayPal Test Mode

Configuring Stripe

To accept payments through Stripe, follow these steps to create a Stripe account, set up a webhook, and obtain your Stripe API keys.

1. Registering for Stripe

Create a new Stripe account here (if you don’t already have one) and confirm your email address.

2. Creating a Webhook

Next, you need to create a webhook so Stripe can notify your site about various events, such as successful or failed payments. This step is crucial for the billing process to function correctly.

  1. Go to Developers -> Webhooks in the left sidebar.
  2. Click “Add Endpoint“. Enter “https://your-site.com/billing/stripe/webhook” in the Endpoint URL field.
  3. Click the “receive all events” button.
  4. Click the “Add endpoint” button.
Add endpoint

3. Getting API Keys

Lastly, you need to copy your Stripe API keys and enter them into the settings page on your site.

Note: Stripe operates in both test and live modes, each with its own set of API keys and webhooks. Use the test mode to ensure everything works correctly (you can find test credit card details here). When you’re ready to start processing real transactions, switch to the live keys and change your Stripe account to live mode from the Stripe dashboard.

  1. Navigate to Developers -> API Keys in the left sidebar.
  2. Copy the API keys displayed on this page and paste them into the corresponding fields in the admin area under settings -> billing page on your site.
Getting API Keys

Configuring Social Login

For social login buttons to function correctly, you’ll need to create an application on their respective sites and input the credentials you receive into the “admin area -> settings -> authentication” page.

Important: The callback URL you enter on Google, Facebook, and Twitter must exactly match the one displayed in the “admin -> settings > general” page, including the protocol (https or http), whether it includes www or not, and all slashes.

Facebook

  1. If you don’t already have one, register for a regular Facebook account.
  2. Go to this URL, click “My Apps” in the top navigation bar, then “Add a New App.”
  3. Enter any display name, your email address, and click “Create App ID.”
  4. Click “+ Product” in the left sidebar, then “Facebook Login,” select “Web,” and enter your site URL. You can ignore the rest of the panels on this page (quickstart).
  5. Click “Facebook Login > Settings” and enter “http://your-site-url.com/secure/auth/social/facebook/callback” into the “Valid OAuth redirect URIs” field.
  6. Click the Status toggle in the navbar to make your application public.
  7. Click “Settings -> Basic” in the left sidebar and copy/paste “APP ID” and “APP SECRET” into the settings page on your site.

Important: Facebook login will only work with secure sites (https).

Configuring facebook login

Google

  1. If you don’t already have one, register for a regular Google account.
  2. Go to this URL, create a new project, click “Credentials” in the left sidebar, then click “Create Credentials” and select “OAuth Client ID” -> “Web Application.”
  3. Enter “http://your-site-url/secure/auth/social/google/callback” into the “Authorized Redirect URIs” field and click “Create.”
  4. Click on “Library” in the left sidebar, search for the “Google+ API” and enable it.
  5. Copy and paste the “Client ID” and “Client Secret” into the settings page on your site.
Configuring google login

Twitter (X)

  1. If you don’t already have one, register for a regular Twitter account.
  2. Go to this URL, click “Create an App,” and fill in the name and description fields with any information. Enter your site URL in the “Website” field.
  3. Open your Twitter project URL, click the app settings icon, then click “set up” next to user authentication settings.
X app

4. Select “Read,” “Request emails from users,” and “Web App, Automated App or Bot.”

5. In the “App info” section, enter “https://your-site.com/secure/auth/social/twitter/callback” into the “Callback URI” field and click Save.

x app permissions

6. Click on “Keys and Tokens” and copy the “API Key” and “API Secret” from the “Consumer Keys” section into the settings page of your site.

Keys and Tokens
x api secret

Configuring Logging

Error logging with Sentry is supported right away. Sentry logs all errors that happen on the site, along with useful information such as the user’s device, operating system, browser, IP address, and more.

To get Sentry working, you need to sign up for a Sentry account.

  1. Create a new account here.
  2. In the next step, select “React” and click “Create Project“.
Sentry logging

3. Copy the “DSN” value and enter it into the “admin > logging > Sentry DSN” field on your site. The DSN can also be found later under “Project Settings -> Client Keys“.

logging key

Custom Domains

Custom domains allow users to attach their own custom domain (example.com) or sub-domain (site.example.com) to their account using A or CNAME records. They can then use these domains for their short links.

Getting custom domains to work requires two steps:

  1. Configuring your server to recognize and handle custom domains.
  2. Updating domain DNS records to point to your server IP. Customers usually do this on their DNS provider or registrar’s website.

Important: If the first step is not completed, users will not be able to connect their custom domain from the “Your URL Shortener” site.

Configuring the Server

You need to configure your server so custom domains point to the Your URL Shortener directory on your server (the same directory where you uploaded the files during installation).

Shared Hosting

On shared hosting, this is typically done by creating an Addon Domain in your cPanel (or whichever control panel your hosting provider uses) for each custom domain.

VPS/Dedicated Hosting

If you have access to your web server’s (Apache or Nginx) configuration files, you can configure your server to automatically direct all custom domains to the Your URL Shortener folder, eliminating the need to add an addon domain for each one.

Server configuration varies from host to host, so this guide can only offer general examples and may not cover all cases.

For instance, if you’re using a VPS with an Apache server, you might modify the default Apache .conf file located in the /etc/apache2/sites-enabled/ folder, named 000-default.conf. Open this file with a text editor, replace the default path /var/www/html/ in the DocumentRoot and Directory blocks with the path to your installation, and restart Apache.

Note: To verify if a custom domain is working, open it in a browser. You should see the homepage of Your URL Shortener. If you see a different page, it means the server recognizes the domain but is directing it elsewhere.

Updating DNS Records

As mentioned, this step is typically performed by the customer or the owner of the custom domain. Users will be guided through this process when connecting a domain via Your URL Shortener.

Manually Setting Server IP

The server IP that appears in the custom domain dialog is usually resolved and shown automatically. However, if you’re using a proxy service, you might need to manually specify the IP to which users should point their custom domains via an A record. This can be done by setting your IP in the .env configuration file located in the main “Your URL Shortener” directory.

Primary Site URL

For security reasons and to ensure full functionality, your site must have a single primary base URL, such as https://site.com. However, users might attempt to access your site using different variations, like https://www.site.com or http://site.com. It’s advisable to redirect these variations to your primary URL via cPanel or another control panel provided by your hosting service.

Changing Primary Site URL

The primary site URL can be changed by editing the .env file with any text editor. Ensure the DNS records for this new URL are correctly pointed to your server; otherwise, your site will become inaccessible.

env file location
Changing Primary Site URL

Roles & Permissions

Permissions

Permissions enable users to perform various actions on the site.

Many permissions are specific to a particular resource, such as a file. A group of permissions for resources typically includes four separate permissions: View, Create, Update, and Delete.

  • View: Allows users to preview file contents on the site.
  • Create: Allows users to upload files to the site.
  • Update: Allows users to modify uploaded files.
  • Delete: Allows users to delete uploaded files.

Important: Users do not need the View, Update, or Delete permission to view or modify their own resources (e.g., files). These permissions are only for resources that do not belong to them.

Roles

Roles can be assigned to multiple users and are created from the admin -> roles page.

Note: Users will inherit all permissions from all the roles they belong to.

Roles have two special types:

  • Default: Roles marked as default will be automatically attached to all newly registered users.
  • Guests: Roles marked as guests will be automatically applied to all non-logged-in users.
Roles & Permissions

Adding Permissions to Users

Users can receive permissions through three primary methods:

  1. Directly to the User:
    • Permissions can be assigned directly to a user from the admin -> users page. This can be done either when creating a new user or editing an existing one.
  2. By Assigning to a Role:
    • Permissions can be granted to a role from the admin -> roles page. Users who are part of this role will inherit the role’s permissions.
  3. Through Subscription Plans:
    • Permissions can also be assigned via subscription plans from the admin -> plans page. Users who subscribe to these plans will gain the permissions attached to the plan.
Adding Roles

Setting Up Analytics Page

Getting Measurement ID

The Analytics page in the admin area (not for link analytics) uses Google Analytics. To get it working, you must sign up for Google Analytics and put in the right details on the settings page. Here’s what to do:

  1. Go to this URL. You will need to sign in to your Google account or create one if you don’t have one already.
  2. If you don’t have any properties in your account yet, click the “Start Measuring” button. Otherwise, choose “Admin -> Create new Property.”
  3. Choose “Web” in the “Data Streams” section, put in your website’s URL, and click the “Create stream” button.
  4. You will get a “Measurement ID”. You need to enter this ID on the settings page later.

Note: If you only want to track visits on your site and don’t need to see analytics in the admin area, just putting the Measurement ID on the settings page is enough. You can skip the rest of these instructions.

Analytics Measurement ID

Getting Service Account Key File

To obtain a service account key file, go to the Google API’s site and either create a new project or select an existing one. Next, you need to activate the “Google Analytics Data API”. Click on “Library”, search for the “Google Analytics Data API”, select it, and then click on “Enable”. After setting up a project with access to the Analytics Data API, you can download a file containing the credentials. Click on “Credentials” in the sidebar, then the “CREATE CREDENTIALS” button. Choose to create a “Service account”.

Create Credentials APIs Services Google Cloud Console

On the following screen, you’ll have the option to name the service account. You can name it whatever you prefer. In the “service account ID” field, you’ll see an email address. Make a note of this address, as you’ll need it later.

Create Service Account Google Cloud Console

Next, select “Project > Owner” Role.

Create Service Account Owner Google Cloud Console

After clicking “Continue” and then “Create,” when the Service Account is created, click the edit button next to it. Then, go to “Keys” => “Add Key” => “Create new key”, choose “JSON” as the key type, and click “Create” to download the .json key file.

You will need to upload this file on your site later, from the “admin > settings > analytics” page.

Granting permissions to your Analytics property

Go back to the Google Analytics site and find the “Property Access Management” page in the Admin section of your property.

Add a new user with the email address you noted earlier. Make sure to use the Google service account email (ending with .iam.gserviceaccount.com), not a personal email address.

Getting the property ID

The last step is to input the credentials on the “admin > settings > analytics” page of your site. You already have the service measurement ID and the service account .json file. Now, get the Property ID from “Property Settings” in the Admin section of the property on the Google Analytics site.

Analytics Property ID

Setting Up Subscriptions

To enable integrated payments and subscriptions, you’ll need to set up Stripe and/or PayPal. These services will manage all sensitive credit card information and payments, so you won’t need to worry about security.

For instructions on setting up PayPal and Stripe, refer to the “Configuring PayPal” and “Configuring Stripe” sections.

Once the payment gateways are configured, you can create billing plans on the “admin -> plans” page. Doing this will automatically create billing plans on all currently active payment gateways.

Important: If you activate a payment gateway after creating plans, ensure to click the “sync” button on the “admin -> plans” page. This will synchronize billing plans between your site and all currently active payment gateways.

Setting Up Subscriptions

Translating the Site

To translate your site, head to the “admin area -> translations” page. To translate a specific line, just click on it in the translation column.

If the line you need to translate isn’t listed, you can add it by clicking the “add new translation” button.

Note: Although you can translate the original (English) locale, it’s advisable to create a new one (using the “+new localization” button). This approach ensures your translations are preserved and not overwritten by future updates.

Translating the Site

Top Location Charts

To ensure the top locations chart functions correctly, you’ll need to obtain a Google Charts API key and input this key into the admin area under Settings -> Links -> Behaviour page.

  1. If you don’t already have one, register for a regular Google account.
  2. Open this URL to create a new project. Then, in the left sidebar, click on “Credentials”.
  3. Click on “Create Credentials” and select “API Key”.
top charts create api

4. Click on “Library” in the left sidebar, search for the “Maps JavaScript API” and the “Geocoding API”, and enable both.

top charts geo

5. Paste your new API Key into the admin area under Settings -> Analytics -> Google Maps JavaScript API Key field in the BeLink admin area.

api key
top charts analytics

Verifying Site Ownership

To verify site ownership with Google Webmaster Console, Bing, or another 3rd party service, you might need to upload a file or add a code inside the <head> tag. This can be easily done in one of the following ways:

1. Uploading a File

If you’re given a file to upload to your site, make sure to upload it into the “public” sub-folder, not the website’s root folder. Otherwise, it will not work.

public folder

2. Adding Code into the Head Tag

If you need to insert code into the <head> tag of your site, the best approach is to add it through the admin panel by navigating to Appearance -> Custom Code -> Custom HTML & Javascript panel. This method ensures that your added code remains intact through future updates without the need to modify any files directly.

Alternatively, you could insert the code directly into the common/resources/views/framework.blade.php file. However, this method is not recommended because any changes made to this file will be lost during updates.

Changing File Permissions

On computer file systems, files and directories come with permissions that determine who can read, write, modify, and access them. This is crucial because an app lacking the necessary permissions to read and write to certain directories may experience functional issues.

Generally, you won’t need to manually adjust permissions unless you encounter errors related to file permissions.

Since permissions vary from one host to another, this guide focuses on general principles and may not address all specific scenarios. It’s intended for servers operating under a standard setup.

Fixing File Permission Errors

If you encounter a file permission error, you’ll need to change the file permissions on your server using a file manager. Most hosting providers include a file manager in their control panel, or you can use an FTP client like FileZilla for Windows or Transmit for Mac.

Typically, you should set folder permissions to 755 and file permissions to 644.

File permission 755
File permission 644

Note: If a file is inside the “storage” directory, you should make the entire “storage” directory and all its subfolders writable by setting their permissions to 755.

Outgoing Emails

To ensure outgoing emails (such as password resets, account validations, notifications, etc.) are sent out correctly, you need to configure your email provider. This can be done from the admin area by navigating to Settings -> Mail Panel.

Several email providers are fully integrated, meaning you simply need to choose your preferred provider on the settings page and enter the relevant credentials.

  • SMTP, Mail, Sendmail: These options utilize a regular SMTP server. Your hosting service likely provides one, or you can opt for free services like Gmail.
  • Mailgun: This free service requires you to register for an API key on the Mailgun site and verify your domain. It is the recommended option.
  • Mandrill: A paid cloud email service similar to Mailgun.
  • Log: This option logs emails into a text file without sending them, useful mainly for testing.

Note: We suggest using cloud email services when possible to circumvent common SMTP issues, such as server timeouts, poor reputation, or blocked ports by hosting providers.

Migrating to a New Server

To migrate to a different server, follow the instructions below without skipping any steps, to avoid losing data or encountering issues with the migrated site.

  1. Zip all files and folders inside the main site directory using your server’s cPanel/Dashboard.
Compress Files

2. Open phpMyAdmin (or another database manager your hosting provider uses) and export the site database.

export database

3. On your new server, open phpMyAdmin, create a new database, and import the SQL file you exported from the old server.

New database import

4. Upload and extract the site files you compressed in step 1 into the public_html directory or another directory where you want your site to be located on the new server.

upload zip file

5. Open the .env file in the main site directory and update your site URL and database credentials to match those of your new server.

env file

Nginx Rules

If you’re using Nginx as your web server, you can apply the following configuration rules. Remember to replace /domains/site.com with the actual path to your site directory.

Important: Ensure the root directive points to the “public” subfolder, not to the main folder where files are uploaded. Failing to do so will result in your site not functioning correctly.

server {
    listen 80 default_server;
    server_name default;
    root /domains/site.com/public;
    index index.html index.htm index.php;
    charset utf-8;

    location ^~ /storage/ {
        # directives for /storage/ location
    }

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { 
        access_log off; 
        log_not_found off; 
    }

    location = /robots.txt  { 
        access_log off; 
        log_not_found off; 
    }

    access_log off;
    error_log  /var/log/nginx/default-error.log error;

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }
}

URL Rewriting is Not Working

If URL rewriting isn’t functioning on your server, the site may experience complete dysfunctionality. You might navigate the site, but you’ll likely encounter 404 errors or other issues on all pages. URL rewriting, also known as “pretty URLs,” can face issues due to several reasons:

  1. .htaccess File Issues: The .htaccess file from the Codecanyon zip might not have been correctly copied to your server. Ensure this file is properly transferred and in the correct directory.
  2. Apache mod_rewrite Module Disabled: If the Apache mod_rewrite module is disabled on your server, your site’s URL rewriting won’t work. This issue typically requires contacting your hosting support if you don’t have access to the server configuration.
  3. .htaccess Overrides Not Allowed: Some servers do not allow overrides through the .htaccess file by default. Like with the mod_rewrite module, resolving this issue usually involves contacting your hosting provider.
  4. Server Incompatibility: If you’re using Nginx or a Windows server instead of Apache, .htaccess rules will not work because they are specific to Apache. For Nginx, you’ll need to use equivalent Nginx rules. Windows Server users can use the IIS Manager to import .htaccess rules or find online services to convert the .htaccess file into a web.config file suitable for Windows Server.

Correctly addressing these issues will help restore functionality to your site by enabling URL rewriting.

Can’t Reset Password

If you’re unable to reset your password through the “forgot password” page, it’s most likely due to improper email configuration. Ensure that your email settings are correctly set up to send password reset emails successfully. For guidance on configuring your email settings, please refer to the “Outgoing Emails” section.

Whoops, Looks Like Something Went Wrong

“Whoops, looks like something went wrong.” is a generic error message displayed when an issue occurs. For more detailed information on the error, you can view a full error stack trace by modifying the application’s .env file. Change the line:

APP_DEBUG=false

to:

APP_DEBUG=true

This adjustment will allow you to see detailed error messages, helping you identify the cause of the problem more accurately.

Important: Remember to set APP_DEBUG back to false after troubleshooting to avoid exposing sensitive information online.

Site Not Loading

If your site isn’t displaying correctly before or after installation or an update – showing either a generic server error (like the one in the image below) or just a loading spinner – consider the following solutions based on your hosting scenario.

Internal Server Error
  • Some hosting providers enforce strict permissions for files and folders. You may need to manually set the permissions for the “public” folder to 755 and for the “public/index.php” file to 644 using a file manager.
755 permission
644 permission
  • Sometimes, the default .htaccess file in the main directory and/or the “public” sub-folder might be overwritten by your server or may not be uploaded at all. You will need to manually open these files through a file manager and verify that their contents are correct. You can find an htaccess.example file containing the original content right next to both .htaccess files.
htaccess
  • Sometimes, you may need to modify one or both .htaccess files mentioned above. To do this, open the file with a text editor and uncomment (remove the # symbol before) the line: RewriteBase /. This is further explained within the .htaccess file itself.
  • The Apache mod_rewrite module might be disabled on your server/hosting. Activating this module is necessary to resolve the issue. It can usually be enabled from the cPanel, but you might need to contact your hosting support to enable it for you.
  • If the solutions above do not resolve the issue, you can check the “errors” page in your cPanel/Hosting Tools Panel for more information on what might be causing the problem.

Resetting User Password

1. From the Admin Area

Administrators can change the password for any user from the admin area.

  1. Navigate to the admin -> users page.
  2. Next to the user whose password you want to change, click the edit icon.
  3. In the “New Password” field, enter a new password or click the “Generate” button to create a random one.
  4. Click the “Update User” button at the bottom of the page.

2. Using the “Forgot Password” Feature

Users can reset their own passwords from the login page.

Note: The outgoing mail server must be configured on the settings page for this feature to work. For more information, see the “Outgoing Emails” section.

  1. Click the “Forgot?” button on the login page.
  2. Enter your email address and click the “Send” button.
  3. Open the email that was sent to you and click the link inside.
  4. Enter a new password and click “Confirm”.
lost password
reset password

3. Lost Admin Password

If you’ve lost your admin password and can’t access the admin area to configure the outgoing email server, follow these steps to reset the admin password:

  1. Open the .env file located in the main site directory.
  2. Change MAIL_DRIVER from smtp to log.
lost admin password

4. Proceed with the instructions under “Using ‘Forgot Password’ button” to reset the password. The reset link will now be stored in a log file instead of being sent via email.

5. Open the storage/logs/laravel.log file, find the reset password link, click on it, enter a new password, and click “Confirm”.

Storage
laravel password reset

Can I Use Another Payment Gateway?

Stripe and PayPal are the currently supported payment gateways. To add new ones, custom modifications to the code would be required.

Where to insert Adsense or another javascript snippet?

You can insert a custom JavaScript snippet, like AdSense or a tracking code, in two places:

  1. Via the Admin Panel: Navigate to admin > appearance > custom JS field. This method is preferable as it allows you to manage your custom JavaScript without directly editing the site’s files, preserving your changes across updates.
  2. Directly in the Site’s Code: Alternatively, you can paste the snippet directly into the common/resources/views/framework.blade.php file. However, this method is less recommended because your changes could be overwritten during a site update.

Can I Modify the URL Structure?

Modifying the original URL structure, such as changing “site.com/login” to “site.com/signin,” is not supported by built-in features. It is possible through custom modifications, but assistance with this process is currently beyond the scope of our support.

We use cookies to improve your experience. By using our site, you accept cookies. Read our Privacy Policy.

Register New Account
Shopping cart