Redirects
-
If I redirect page A to page B does page A need to exist before Google sees the redirect. Or can I just put up a redirect and delete page A.
If the page doesn't need to exist: You have all your redirects in place for a website. You want this website to redirect to another website. You completely delete the website and put up the htaccess, there should be no problem with this, because the redirects are in place correct?
Thanks
-
Think of Googlebot like a web user (who happens to be somewhat aimless and browses without JavaScript support).
Googlebot requests a page that it finds by A) following a link on another page, B) following a reference in a sitemap.xml file or C) some other usage data we don't know about (i.e. it scraped the link from a source it doesn't "officially" have access to or users have hit that page frequently with Google toolbar installed, etc).
This is a basic server request for the page. The server gets the message "load this URL" - if there's an .htaccess 301 redirect in place, it does not matter whether the page would ordinarily display content, because the server never gets to that point. It handles the redirect first.
I'm hung up on the second part of your question. "If the page doesn't need to exist...you want this website to redirect to another website." I'm not sure under what circumstances you'd need to do this. If the page doesn't exist, it shouldn't be referenced anywhere on the web, and if it's not referenced anywhere on the web, there's no need for the redirect.
Perhaps you're planning to set up the page as a vanity URL - such as a short URL, for easy reading/remembrance.
In short, for whatever reason you want to achieve this, .htaccess bypasses the need for the first URL to exist - it works on the request for that page, whether the page is there or not, the redirect will bypass it and work properly.
-
To your first question: Redirects are done for pages that presently exist and have been indexed by Google, not for pages that don't presently exist on a website. So if it's a page that has already been indexed by Google, you would implement a 301 redirect to point the old page and most of its link juice to the new page. (Not sure if this answer is what you were after - maybe I don't get the question?)
As to redirecting an old site to a new domain: I suppose you could technically delete the old pages when you put up the htaccess file with the redirects to the new pages. However, I'd strongly caution against doing this in case you need to access the old content for some reason. The crawler won't be able to get at it, because as soon as it hits the server it will trigger the htaccess file which will forcibly send them to the new URLs. I've occasionally had to access an old site's content, so I'm glad I didn't delete it entirely.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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
-
CGI Redirects
Trying to 301 old legacy files like oldsite.com/green/red.cgi/blue/ using this htaccess code: Redirect 301 /green/red.cgi/blue/ http://www.newsite.com/summary-page/
Technical SEO | | SoulSurfer8
Instead it's redirecting to: newsite.com/red.cgi/blue/ FYI oldsite.com's htaccess file does not have any global 301 rules that would conflict Does anyone know if cgi files require a different 301 syntax? Thanks!0 -
301 redirect from sites closing down
Hi We have around 10 supplementary sites that have links to our site which are now closing down but are out of our control. We could have access to their domains so how could we maintain the link juice from these old sites which are going to our new site? However there will be no websites left on these old supplementary just domain names
Technical SEO | | ocelot0 -
Using 302 redirect for SEO
Hello, I'm in charge of SEO for an information website on which articles are only accessible if you have a login and password. Most of the natural links we get point to our subscribers' subomain : subscribers.mywebsite.com/article1 If they follow these natural links, visitors who are not logged get redirected (302) to www.mywebsite.com/article1 on which there is an extract of the article and they can request a free test subscription to read the end of the article. My goal is to optimize SEO for the www.mywebsite.com/article1 page. Does this page benefit from the links I get to the subscribers.mywebsite.com/article1 page or are theses links lost in terms of SEO? Thanks for your help, Sylvain
Technical SEO | | Syl200 -
Redirecting root to /default.aspx
Hello, I have a client who's home page redirects to /default.aspx - what are the possible SEO impacts of this? As the home page redirects to /default.aspx and does not load under both there does not seem to be a duplicate content issue. Also the redirect should carry over most of the link juice from the home page to /default.aspx therefore are there any negative SEO "side effects" of this set-up? Thanks in advance!
Technical SEO | | RikkiD220 -
301 Redirect Help
How would you 301 redirect and entire folder to a specific file within the same domain? Scenario www.domain.com/folder to www.domain.com/file.html Thanks for your Input...
Technical SEO | | dhidalgo11 -
301 redirect or 302
A client of mine has an international company named www.taxglobalizers.com if you come from Holland they 302 redirect you to the www.taxglobalizers.com/en version of the site and if you come from Holland they redirect with a 302 to www.taxglobalizers.com/nl version. I think it is best to change this in a 301 redirect. Am i correct in this? Kind Regards, Ruud
Technical SEO | | RuudHeijnen0 -
Redirects
Hello, My question is: how important is it to wait for the a redirect to get seen and cached before you take down the old page? More in depth: my old platform has seriously limited my ability to add sitemaps and make edits to htacces. I just want to change nameservers (which will delete everything on there) and upload the htaccess is that alright? Another way of saying it: when redirecting a page, is it necessary for google to see the old page before it is deleted? Thanks Tyler
Technical SEO | | tylerfraser0 -
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" );
Technical SEO | | EssEEmily
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) http://imgur.com/a/1lar5 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! 1lar50