301 redirect to robots.txt to another domain, maybe to a cloud front layer

I would like to know if I can put a 301 redirect on the robots.txt file and navigate it to another location?

example site = https://www.example.net/robots.txt redirects to https://differentdomain.net/example/robots.txt

htaccess – Can I use REGEX to 301 an URL with extra characters at the end?

I just configured PHPlist to manage my email subscribers.

When people opt, they are directed to this page:


I would like to redirect them to a custom page here:


I have tried to 301 from / lists /? P = subscribe & id = 1 to / welcome, but it won't work. I guess it's because of the characters after / lists /.

And, I can't 301 from / lists to / welcome because / lists is also the first part of the unsubscribe page.

Is there a way to 301 from the full address above with REGEX? Or is there another way to get people to a custom page – without changing the PHP code base?

Thank you!

apache – HTTPS migration: 302 redirect instead of 301

I migrated my website from http: // albeit to https: // whatever, by inserting these three lines at the start of my & # 39; .htaccess & # 39; file:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 (L,R=301)

However, if I parse the HTTP headers from & # 39; http: // mydomain & # 39; (for example using "curl -I http: // mydomain"), I see

HTTP/1.1 302 Found
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Location: https://mydomain

What am i doing wrong? Thank you so much.

Google search console – Inspect the old domain after 301 redirect

After redirecting to a new domain

I tried to inspect the old domain URL from its webmaster and I got this information

The URL is not on Google This page is not in the index, but not because of
a mistake. See the details below to find out why it hasn't been indexed. Learn

enter description of image here

If yes, then why do i always lose my ranking in google search?

I would also like to know what is the difference between the Reference page and Canonical declared by the user?

vhost – 301 redirect for the "/ usage" page while webalizer is installed

I moved my site to another host and that host uses webalizer. My site has a page called /usage.

During the tests, I discovered the page https://example.com/usage/ generate the 403 Forbidden error due to this webalizer.conf:

# This configuration file maps the webalizer log analysis
# results (generated daily) into the URL space.  By default
# these results are only accessible from the local host.
Alias /usage /var/www/usage

   # Alternative e.g. "Require ip 192.168.10"
   Require local

OK, I renamed usage at some-usage and created a 301 redirect but apparently the configuration file has higher priority.

My questions):
Can I be more specific in webalizer.conf and tell Apache to ignore /usage when it is in the https://example.com/usage/ context, or, how can i set the 301 redirect for it to work.

Personally, I would prefer the solution where Apache ignores /usage in the https://example.com/usage the context.

ssl – Redirection loop 301 www to non-www – Nginx + Apache2

Thanks for any help. I am not a server but I am dealing with a server at the moment. I have a site that is in a www to non-www redirect loop. I am using a DigitalOcean Droplet with Ubuntu and Nginx for SSL. I initially had problems getting SSL to work and I created a configuration based on this post on StackExchange: WordPress redirection loop on nginx + apache reverse proxy. The main difference that I had made was to use a 302 redirect in the last server block. However, someone told me to change it to 301 and now I'm passing the loop from www to non-www. Here is my configuration file.

server {
        server_name .mysite.com;
        root /var/www/html;

        # Add index.php to the list if you are using PHP
        index index.php index.html;

        gzip on;
        gzip_types application/javascript image/* text/css;
        gunzip on;

        location ~.(js|css|png|jpg|jpeg) {
                try_files $uri $uri/ =404;

        location / {
                try_files $uri @apache;

        location ~(^?)*/$ { # proxy directories
                proxy_set_header X-Real-IP  $remote_addr;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header Host $host;

        location ~ .php$ { # serve php files
                proxy_set_header X-Real-IP  $remote_addr;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header Host $host;

        location @apache { # used by location /
                proxy_set_header X-Real-IP  $remote_addr;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header Host $host;

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        location ~ /.ht {
                deny all;

        listen (::):443 ssl ipv6only=on;
        listen 443 ssl;
        ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem;
        include /etc/letsencrypt/options-ssl-nginx.conf;
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;


server {
    listen 80;
    server_name _;
    return 301 https://$host$request_uri;

Note: changing the 301 to 302 did not solve the problem.

Help me, thank you!

Edit: I have also confirmed that there is no reference to www.mysite.com in the database. I used WP-CLI to find it. And the home and site URLs have always been without www.

seo – URL modified for a page indexed by Googlebot. Will redirect 301 from the old URL to the new one. But what to do with my sitemap?

I plan to change a URL for one of the pages of my site.


Of: https://www.example.com/old-post-slug

AT: https://www.example.com/new-post-slug

The point is, Google has already indexed the old URL: https://www.example.com/old-post-slug

And from these DOCs, we see that to avoid losing page ranking, we have to answer with a 301 - Moved permanently from the old URL pointing to the new URL.


enter description of image here


I get that I should redirect (301) from the old URL to the new one. So when Google re-explores, it will see this change. But what should appear on my site map? The old URL or the new one? Or both?

I tend to think that it would be better to keep only the new URL on my sitemap. But what if Google crawls the new URL before seeing the redirect from the old one? Wouldn't the new page URL start as a new page (from a Google index point of view) with zero ranking points? How does Googlebot handle this? What is the recommended practice?

dns – Troubleshooting Cloudflare 301 redirects

My client has a URL that he wants to redirect entirely to another site (redirect 301). This domain is purchased and managed via GoDaddy (unfortunately). After setting up redirection, I was having problems because the URL does not have an SSL certificate installed. GoDaddy charges $ 80 / year for SSL certificates. I have tried to work around this by routing traffic through Cloudflare, but my records and page rule configurations seem to do nothing.

Anyone know how to do it right?

How best to perform 4 million jpeg 301 URL redirects?

I certainly don't want to list 4 million redirects in my nginx configuration files … what's the best practice with a lot of redirects like this? They would be permanent as well as the old live links in many historical customer emails, so I can't rely on Google et al to update their indexes over time.

I guess I need a 404 configuration that checks the requested JPG against a database of old URLs with their corresponding new URL?

seo – Someone 301 redirects penalized websites to my website

Some people make a negative SEO attack on my 301 site by redirecting toxic sites to my site, I have done research and no one online seems to have an answer, disown the domain doing the 301 work or should I disown any links to Domain 301 which then redirects to me? Is there also a way in htaccess to cause a redirect loop for them?