SocialDomainRedirect is a simple project designed to help you create a personal landing page that redirects visitors to your various social media profiles. By configuring a single HTML file, you can provide a centralized location for all your social media links.
To illustrate how SocialDomainRedirect works, let's consider an example. Suppose you want to redirect visitors from ig.your-domain.com to your Instagram profile at instagram.com/@your-username. You would configure your index.html file as follows:
const subdomainRedirects = {
"yt": "https://youtube.com/@channel",
"youtube": "https://youtube.com/@channel",
"fb": "https://facebook.com/@page",
"facebook": "https://facebook.com/@page",
"ig": "https://instagram.com/@profile",
"instagram": "https://instagram.com/@profile",
"tt": "https://tiktok.com/@profile",
"tiktok": "https://tiktok.com/@profile",
"x": "https://twitter.com/@profile",
"twitter": "https://twitter.com/@profile",
"discord": "https://discord.gg/@server",
"gh": "https://github.com/profile",
"github": "https://github.com/profile",
"linkedin": "https://linkedin.com/in/profile",
"tw": "https://twitch.tv/profile",
"twitch": "https://twitch.tv/profile",
"spotify": "https://open.spotify.com/user/profile",
"steam": "https://steamcommunity.com/id/profile"
};By setting up your DNS records to point ig.your-domain.com to your GitHub Pages site, visitors will be automatically redirected to your Instagram profile when they visit ig.your-domain.com.
To use this project, you will need:
- A GitHub account
- Basic knowledge of HTML
- A text editor (such as VS Code, Sublime Text, or Notepad++)
To configure the index.html file, follow these steps:
- Fork the repository to your GitHub account.
- Open the
index.htmlfile in your preferred text editor. - Locate the section where you need to add your social media links.
- Replace the placeholder URLs with your actual social media URLs.
- Save the changes to the
index.htmlfile.
You can easily host your site using GitHub Pages by following these steps:
- Push your project to a GitHub repository.
- Go to the repository settings.
- Scroll down to the "GitHub Pages" section.
- Select the branch you want to use for GitHub Pages (usually
mainormaster). - Click "Save" to enable GitHub Pages for your repository.
Your site will be available at https://<your-username>.github.io/<repository-name>/.
This project is licensed under the Apache-2.0 license. See the LICENSE file for more details.