A technical 301 Redirect Question
-
Alright, I'm taking a chance and stepping into the developer role here...something completely out of my comfort zone so bear with me.
We have a pretty site built in PHP (www.dassant.com) and we are coming across some duplicate content issues. For example, these are supposed to be the same page:
http://www.dassant.com/products.php
and
http://www.dassant.com/products
So the SEO in me states the obvious: We need a 301 redirect stat! Unfortunately, our developer went MIA and I am having the hardest time getting a 301 implemented.
After some research I found the code that I need to paste into the PHP (for this specific page):
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.dassant.com/products" );
?>However, when I paste it in, upload and refresh the page, I get these error messages in the (multiple) browsers I use. (See attached)
With my limited knowledge I can't find these supposed other redirects so I'm stumped. Can anyone shed some light?
Thank you in advance!
-
Looks like both URLs are being rendered from the same View (products.php). Depending on how your site was implemented you're going to have to address it at the controller and/or rewrites level.
What the error says is that the page is redirecting to itself ad-infinitum.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
After you remove a 301 redirect that Google has processed, will the new URL retain any of the link equity from the old URL?
Lets say you 301 redirect URL A to URL B, and URL A has some backlinks from other sites. Say you left the 301 redirect in place for a year, and Google had already replaced the old URL with the new URL in the SERPs, would the new URL (B) retain some of the link equity from URL A after the 301 redirect was removed, or does the redirect have to remain in place forever?
Technical SEO | | johnwalkersmith0 -
Switching forum software - 301 redirects?
Hi everyone I'm working on a successful Wordpress site that also has a forum attached. The forum currently uses YAF forum software, which requires Windows hosting. The site owner wants to switch to Linux hosting. This is not a problem for WP, but it does mean that we'll need to transfer the forum to Xenforo or something similar that runs on Linux. We're OK with the technical side of this, but we're worried about the SEO implications. The URL for every forum post (more than 50,000 of them) is going to change during this transfer. It seems completely impractical to 301 each of those, so should I just 301 the URLs that have inbound links? Also, what is google's algo going to think when we suddenly have ~50,000 404s? Many thanks in advance! J
Technical SEO | | van280 -
To 301 redirect or not...
Hi guys i'd like to get your opinion on this. We currently have two sites, site A is the old one with PA44 and DA33. Site B is the new one which is going to replace site A it currently has PA37 and DA24 Our plan for the future is to shut down site A and redirect all pages using 301 to the relevant pages on side B. Currently we have some links in place for a couple of keywords on site A to site B which seems to be working great for our ranking. Now i'm wondering if this is maybe a good option, to give back links from A to B or will i pass through more link juice when redirecting everything? (ps. both are e commerce sites hosted and registred with different companies)
Technical SEO | | Immanuel0 -
301 redirect and search engines
How long until 301 redirects get recognized by search engines? I noticed my link on Google isn't forwarding over to my new domain even after the 301 redirect. If I go to the site directly, the 301 redirect works. Anyone know how long it takes for search engines to pick it up? Thanks!
Technical SEO | | timeintopixels0 -
How do find where a 301 redirect is located
My report says I have http://www.30minuteseder.com/Passover.blog redirected to http://30minuteseder.com/Passover.blog. It is correct, but I can't find where the 301 redirect is located. I looked in my .htaccess file in the root and it's not there. How do I find it so I can change it?
Technical SEO | | Sederman0 -
Rel=cannonical + 301 redirect
Hi All I am currently working on a DotNetNuke site. I have enabled friendly URL's which have changed the url structure from the default setting of TabId=x to whatever the page name is set as. I will use the following page as an example - www.notarealdomain./graphicdesign.aspx Now I would like to know if it would be worth my time to change this to "/graphic-design.aspx through the use of a 301 redirect and/or a rel=can. Any help would be much appreciated. Thanks
Technical SEO | | masterpete0 -
Rel - canonical vs 301 redirect
I have multiple product pages on my site - what is better for rankings in your experiance? If I 301 the pages to 1 correct version of the product page - or if I rel caanonical to the one correct page?
Technical SEO | | DavidS-2820610 -
301 redirecting some pages directly, and the rest to a single page
I've read through the Redirect guide here already but can't get this down in my .htaccess I want to redirect some pages specifically (/contactinfo.html to the new /contact.php) And I want all other pages (not all have equivalent pages on the new site) to redirect to my new (index.php) homepage. How can I set it up so that some specific pages redirect directly, and all others go to one page? I already have the specific oldpage.html -> newpage.php redirects in place, just need to figure out the broad one for everything else.
Technical SEO | | RyanWhitney150