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.

4.5 ★ | 2 Vote

May be interested

  • How to forward multiple Gmail emails at onceHow to forward multiple Gmail emails at once
    to forward multiple gmail emails at the same time to another account, we will immediately use the options available on gmail without the need for external utilities or applications.
  • Instructions for forwarding messages on ViberInstructions for forwarding messages on Viber
    forward mesages viber feature is a new update feature, allowing users to forward links, files, images or text messages to many people.
  • YouTube tests a new AI fast forward feature to help stop watching videos from being boringYouTube tests a new AI fast forward feature to help stop watching videos from being boring
    youtube creator's technical team said that youtube is testing a new feature based on ai (artificial intelligence) to help viewers fast forward to the best parts of the video for the best video viewing experience.
  • How to Forward Emails from Yahoo to GmailHow to Forward Emails from Yahoo to Gmail
    today's tipsmake will show you how to forward emails you receive on yahoo to your gmail inbox. this operation needs to be done on a computer. remember that the gmail address you forward mail from yahoo to must be different from the alternate email address you provided in your yahoo account.
  • How to Forward Minecraft PortsHow to Forward Minecraft Ports
    this article will show you how to forward ports for your minecraft server. forward port forwarding is necessary if you want to allow people who are not on your wi-fi network to join your server, as this will allow traffic from outside the network to enter your computer. friend.
  • Instructions for fast copying URLs of open tabs in Firefox browserInstructions for fast copying URLs of open tabs in Firefox browser
    you open too many tabs in firefox? perhaps you will want to close some windows to speed up the browser or reduce confusion and clutter. fortunately, there is a quick tip that helps you copy all the urls of open tabs. then you can paste them into notepad or similar text editing application and save.
  • How to forward mail (forwarded mail) has received to another mailHow to forward mail (forwarded mail) has received to another mail
    how to forward mail (forwarded mail) has received to another mail. when you own 2 or more gmail accounts, it will take a lot of time to check your mail everyday because we often have to log into each account to check the mailbox. to solve
  • Instructions on how to delete URLs automatically suggested in Chrome browserInstructions on how to delete URLs automatically suggested in Chrome browser
    please join tipsmake.com refer to the article to guide how to delete urls automatically suggested in chrome browser below!
  • URL encoding in HTTPURL encoding in HTTP
    http urls can only be sent via the internet by using ascii character sets, which often contain characters outside the ascii character set. therefore unsafe characters must be swapped with a% followed by two hexadecimal digits.
  • How to fast forward and rewind 10 seconds in YouTubeHow to fast forward and rewind 10 seconds in YouTube
    if you do not want to take the 10-second search to rewind and skip back in a video playing on youtube for iphone, android or ipad, users can do it very quickly.