How to Forward URLs
Write the .htaccess 301 Forward code
How to Forward URLs Picture 1
Find a website running on an Apache server. This is necessary to continue the .htaccess method - check the web provider if you are unsure.
How to Forward URLs Picture 2
Locate and download the .htaccess file. The .htaccess file is what the web provider checks for information for error handling, security, and page request forwarding. Check the root directory (where all website files are stored) and download the files to edit.
How to Forward URLs Picture 3
Create .htaccess file. If you don't see .htaccess in the root directory, you can create the file using Notepad (or a similar text editing application). File code in the next step.
Make sure you save the .htaccess file name starting with a '.'
Note the file does not have an extension (e.g. '.com' or '.txt')
How to Forward URLs Picture 4
Insert code. Paste the code below into the .htaccess file: .redirect 301 /old/oldURL.com http://www.newURL.com
In the code, "oldURL.com" is the website from which the visitor is forwarded, while "http://www.newURL.com" is the website the visitor is forwarded to .
There must be a space between "oldURL.com" and "http://"
Don't add "http://www" to the (old) URL in the first part of the code!
The "301" code is commonly used on page transitions and "permanent transitions". Research the code "300" further for other functions.
How to Forward URLs Picture 5
Set a new destination URL. Change 'http://www.newURL.com' to the domain address you want visitors to be forwarded to.
How to Forward URLs Picture 6
Save the .htaccess file. In the 'all files' section, choose to save the .htaccess file without the extension.
How to Forward URLs Picture 7
Create backup. Rename the .htaccess and html files with the same name to keep a backup. For example, use the name .htaccessbackup so you can find and recognize the file in case you need to restore previous code.
How to Forward URLs Picture 8
Upload the modified file to the root directory of the old domain. You can now modify the code as needed, placing the file in the old URL to read and forward as intended.
How to Forward URLs Picture 9
Check the transition process. Open a private browsing window and type the old domain name into the address bar. Once you've completed everything correctly, the website will forward to the new page.
Use a private browsing window to ensure that your browser accesses new transitions instead of relying on cached data (data stored to access good websites faster).
In a private browsing window, you can clear your browser's cache through the customization menu. For more detailed information, read the article Clear Browser Cache.
Use of Relay Services
How to Forward URLs Picture 10
Check with the web provider. If you're not sure about your coding abilities or want to forward URLs without touching the code, you can use relay services, and your web provider may be one of them. Many web providers have transition services and companion support to help you achieve your goals. Check this functionality with your current web provider or contact them directly for options.
How to Forward URLs Picture 11
Choose an intermediary service. If your web provider doesn't have a relay service, you can choose an intermediary service. Depending on the type of forwarding you need, you may be able to find a free service.
Many services allow you to configure forwarding options, for example the type of forwarding (permanent or temporary) or whether query parameters are passed along.
Only a few services allow you to forward HTTPS (secure) links.
How to Forward URLs Picture 12
Follow the direction of the forwarding service. Typically, these services are user-friendly and have step-by-step instructions that make it easy for you to follow.
Note: in some cases, you still need to edit the DNS (Domain Name System) records of the domain you want to forward. You can access it from the supplier's website.
How to Forward URLs Picture 13
Update DNS records. The intermediate relay service will notify you if you need to access and edit these records through the server account.
Instructions for editing DNS records in this step completely depend on the service you use, usually both service providers and web providers have simple instructions.
Use Meta Commands
How to Forward URLs Picture 14
Access the code snippet of the page you want to forward. This is another method that directly changes the code of the page, you need to download the file linked to the URL thereby redirecting to another page.
Note: in most cases, using Meta directives for forwarding is not ideal. Websites with Meta transition codes are often screened by search engines because it is an unknown technique.
How to Forward URLs Picture 15
Open the code for editing. Use 'Notepad' or similar text editing software to open the page's code file. Save a copy before editing as a precaution.
Edit the code. The Meta code begins after the "head" tag () in the page's code snippet. Import : .
There is a space between "refresh" and "content"
"0" is the number of seconds before the transition.
"www.newsite.com/newurl.html" is the address the page forwards to .
It is possible to create a custom error message or notify that your site has moved, but this will attract unwanted attention to the transition page!
How to Forward URLs Picture 16
Save the file and re-upload it to the old site. If you're forwarding visits from the old URL, it's likely that other changes have also been replaced in the URL snippet (e.g. removing page content). It is important that the current URL code contains the meta transition code.
How to Forward URLs Picture 17
Check forwarding. Enter the URL in your browser's address bar or use a search engine to find it. The website will immediately switch to the new URL written in the code without receiving any notifications or interruptions.
Use Other Programming Languages
How to Forward URLs Picture 18
Find your website's programming code. For each programming language, the transition code is a little different. If you're not sure about the answer to this question, contact your web provider for more information.
How to Forward URLs Picture 19
Research other forwarding codes. There are different encoding commands for each language and many options to explore within each language. Search the internet to determine the appropriate code for your website.
For example, you can easily learn about PHP, ASP, ColdFusion, and Javascript forwarding code online.
How to Forward URLs Picture 20
Check forwarding. Once you've found the right code for your page, the process is similar to other coding methods. Then don't forget to test the forwarding by visiting the (old) URL to see if everything works as planned.
You should read it
- How to update URLs when moving WordPress sites
- Set up auto-sending, Forward email to another account in Gmail?
- What is Forward Mail? How Forward forwarding mail to another email in Gmail
- Some basic concepts to know about Search Engine Optimization - SEO (part 3)
- How to automatically forward emails in Outlook
- How to forward mail from Yahoo to Gmail
- How to forward mail in Gmail
- How to turn off auto-suggested URLs on Coc Coc
- How to forward multiple Gmail emails at once
- Instructions for forwarding messages on Viber
- How to Forward Emails from Yahoo to Gmail
- How to Forward Minecraft Ports