Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9018355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:30:21+00:00 2026-06-16T04:30:21+00:00

I have two site sitea.com and siteb.com I need to redirect pages from sitea.com

  • 0

I have two site sitea.com and siteb.com

I need to redirect pages from sitea.com to siteb.com. The redirect script in sitea.com is

<?php
header("Location: http://siteb.com/somepage");
?>

The redirection is taking without any flaw. The functionality if fulfilled. But I have google analytics tracking on siteb.com which should show that the source is referral from sitea.com

I dug into web developer tools in google chrome and found that siteb.com doesn’t send a referral header in the request.

How do i redirect my visitors from sitea.com to siteb.com which sends the referral headers on siteb.com.?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:30:22+00:00Added an answer on June 16, 2026 at 4:30 am

    The best way to keep the referal is to issue a standard 301 from the server.

    How to do this using .htaccess

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !newdomain.com$ [NC]
    RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]
    

    Doing it straight from PHP should also work (as pointed out by DaveRandom) just be sure to include the HTTP response code.

    <?php
    // 301 Moved Permanently
    header("Location: http://siteb.com/somepage", TRUE, 301);
    

    And bellow a table with data from diferent ways to re-direct and it’s impact on analytics.

    Redirect method             | Browser   | Result            | Impact on analytics
    ----------------------------+-----------+-------------------+--------------------
    Meta refresh - 0            | Firefox 3 | Blank referrer    | Lost data
                                | IE8       | Blank referrer    | Lost data
                                | Opera 9   | Internal referrer | Lost data
    Javascript:location.href    | Firefox 3 | Internal referrer | Lost data
                                | IE8       | Blank referrer    | Lost data
                                | Opera 9   | Internal referrer | Lost data
    Javascript:location.replace | Firefox 3 | Internal referrer | Lost data
                                | IE8       | Blank referrer    | Lost data
                                | Opera 9   | Internal referrer | Lost data
    Server-side 301             | Firefox 3 | Original referrer | 
                                | IE8       | Original referrer | 
                                | Opera 9   | Original referrer | 
    Server-side 302             | Firefox 3 | Original referrer | 
                                | IE8       | Original referrer | 
                                | Opera 9   | Original referrer | 
    Server-side 301 - chained   | Firefox 3 | Original referrer | 
                                | IE8       | Original referrer | 
                                | Opera 9   | Original referrer | 
    Server-side 302 - chained   | Firefox 3 | Original referrer | 
                                | IE8       | Original referrer | 
                                | Opera 9   | Original referrer | 
    

    Original link for the above table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to do rewrites so that the pages: http://www.site.com/page-one http://www.site.com/page-two http://www.site.com/page-three http://www.site.com/page-four Are
I have two similar wordpress websites. http://site.com/ and http://site.com/en/ When I try to load
i have many urls(string): $one = 'http://www.site.com/first/1/two/2/three/3/number/342'; $two = '/first/1/two/2/number/32'; $three = 'site.com/first/1/three/3/number/7'; $four
On this site: http://walkman.pk/aserdus2/tagok.php I have two background-images on the left and right side,
I have two questions. I want to send SMSes from a web-site in PHP
I have two versions of the same proof-of-concept site: The unsecure version: http://www.tlsadmin.com/tlsadmin/PortalHome.aspx and
I have two ASP.NET 4.0 sites on Win2008R2 IIS7, e.g. demo1.site.domain.com and demo2.site.domain.com, and
I have two sites - both are my projects. On site two, I need
I have a site that utilizes a bottom fixed position masthead here: http://www.entheospartners.com/newsite/ This
I have a WordPress site in two languages (Hebrew and English) and I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.